\n\n');
// Remove
and
content = content.replace(new RegExp('\\s*
', 'mgi'), '');
content = content.replace(new RegExp('\\s*
\\s*', 'mgi'), '\n\n');
content = content.replace(new RegExp('\\n\\s*\\n', 'mgi'), '\n\n');
content = content.replace(new RegExp('\\s*
\\s*', 'gi'), '\n');
// Fix some block element newline issues
content = content.replace(new RegExp('\\s*
\\s*', 'mg'), '
\n');
content = content.replace(new RegExp('\\s*\\[caption([^\\[]+)\\[/caption\\]\\s*', 'gi'), '\n\n[caption$1[/caption]\n\n');
content = content.replace(new RegExp('caption\\]\\n\\n+\\[caption', 'g'), 'caption]\n\n[caption');
blocklist2 = 'blockquote|ul|ol|li|table|thead|tr|th|td|h[1-6]|pre';
content = content.replace(new RegExp('\\s*<(('+blocklist2+') ?[^>]*)\\s*>', 'mg'), '\n<$1>');
content = content.replace(new RegExp('\\s*('+blocklist2+')>\\s*', 'mg'), '$1>\n');
content = content.replace(new RegExp('
]*)>', 'g'), '\t');
if ( content.indexOf('