code: function(text, max, index, token) {
          if (text.length <= max) {
              return [h.create_line({
                  type: token.type,
                  token: token,
                  text: text,
                  start: index,
                  end: index + text.length - 1
              })];
          }
          var pointer = text.substr(0, max + 1).lastIndexOf(" ");
  
          if (pointer === -1) {
              pointer = max - 1;
          }
  
          return [h.create_line({
              type: token.type,
              token: token,
              text: text.substr(0, pointer),
              start: index,
              end: index + pointer
          })].concat(split_text(text.substr(pointer + 1), max, index + pointer, token));
      }
docs: 'dialogue'