import striptags from 'striptags';

function firstLine(content) {
  content = striptags(content.replace(/></gi, '>\n<')).replace(/&nbsp;/gi, ' ').trim().split('\n')[0];
  if (!content) return '';
  return content.substr(0, 250).replace(/&amp;/g, '&');
}

function secondLine(content) {
  // Remove first line
  content = striptags(content.replace(/></gi, '>\n<')).replace(/&nbsp;/gi, ' ').trim().split('\n')[1];
  if (!content) return '';
  return content.substr(0, 250).replace(/&amp;/g, '&');
}

module.exports = { firstLine, secondLine };

@@ -304,23 +304,23 @@
  line%0A  
-content
+let res
  = strip
@@ -404,12 +404,57 @@
 %5Cn')
-%5B1%5D;
+;%0A  content = res.slice(1, 10).join(' ').trim();%0A
 %0A  i

Fix formatting for secondary line (#1257)