Python / genshi newline in html <p> paragraphs
I am trying to output the contents of a comment using genshi, but I cannot figure out how to convert newlines to HTML paragraphs.
Here is a test example of how it should look:
input: 'foo\n\n\n\n\nbar\nbaz'
output: <p>foo</p><p>bar</p><p>baz</p>
I searched everywhere for this feature. I could not find it in genshi or in python std lib. I am using TG 1.0.
+3
halmocka
source
share3 answers