diff --git a/pelican/tools/pelican_import.py b/pelican/tools/pelican_import.py index 9a19f33c..b45d4fec 100755 --- a/pelican/tools/pelican_import.py +++ b/pelican/tools/pelican_import.py @@ -224,10 +224,10 @@ def fields2pelican(fields, out_markup, output_path, dircat=False): html_filename = os.path.join(output_path, filename+'.html') with open(html_filename, 'w', encoding='utf-8') as fp: - # Replace simple newlines with
+newline so that the HTML file - # represents the original post more accurately + # Replace newlines with paragraphs wrapped with

so + # HTML is valid before conversion paragraphs = content.split('\n\n') - paragraphs = ['

%s

' % p for p in paragraphs] + paragraphs = ['

{}

'.format(p) for p in paragraphs] new_content = ''.join(paragraphs) fp.write(content)