From cc30695b72772a5faab8bfccf217e2e1397b4f9f Mon Sep 17 00:00:00 2001 From: Aaron Kavlie Date: Wed, 18 Apr 2012 09:29:47 -0700 Subject: [PATCH] Correct comment; switch to new style string formatting. --- pelican/tools/pelican_import.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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)