var fold = /<div class='fold'/;

export default function getPreFoldContent(content) {
  const match = fold.exec(content);
  if (match) {
    return content.slice(0, match.index);
  }
  return content;
};

var prefix = /<p>(<em>)?\[[^\]]+\](<\/em>)?<\/p>/m;
var fold = /<div class='fold'/;

export default function getPreFoldContent(content) {
  const foldMatch = fold.exec(content);
  if (foldMatch) {
    content = content.slice(0, foldMatch.index);
  }

  content = content.replace(prefix, '');

  return content;
};

Remove post prefix from preFold content