code: function restoreSpaces(string, tokens) {
    let result = /^\s+$/.exec(string);
    if (result) {
      return [result[0]];
    }
  
    result = /^[ ]+/.exec(string);
    if (result) {
      if (Array.isArray(tokens) && tokens[0] && tokens[0].content &&
        Array.isArray(tokens[0].content) && typeof tokens[0].content[0] === 'string') {
        tokens[0].content[0] = result[0] + tokens[0].content[0]; // eslint-disable-line
      } else if (Array.isArray(tokens)) {
        tokens.unshift(result[0]);
      } else if (Array.isArray(tokens.content)) {
        tokens.content.unshift(result[0]);
      } else {
        tokens = [result[0], tokens]; // eslint-disable-line
      }
  
      return tokens;
    }
  
    result = /[ ]+$/.exec(string);
    if (result) {
      if (Array.isArray(tokens)) {
        tokens.push(result[0]);
      } else if (Array.isArray(tokens.content)) {
        tokens.content.push(result[0]);
      } else {
        tokens = [tokens, result[0]]; // eslint-disable-line
      }
    }
  
    return tokens;
  }
docs: restoreSpaces
  
  Function restore starting and finishing spaces what Markdown-it was deleting
  
  @param {string} string - original line
  @param {Array} tokens
  @returns {*}