textile / python-textile

A Python port of Textile, A humane web text generator
Other
69 stars 22 forks source link

Blank lines break <code><pre> blocks #80

Open adam-iris opened 2 years ago

adam-iris commented 2 years ago

Works fine with multiple lines:

>>> print(textile.textile('''<pre><code>Line1\nLine2</code></pre>'''))
<pre><code>Line1
Line2</code></pre>

But a blank line causes the contents to be textile-ized:

>>> print(textile.textile('''<pre><code>Line1\n\nLine2</code></pre>'''))
    <p><pre><code>Line1</p>

    <p>Line2</code></pre></p>

It looks like you can work around this by using bc..:

>>> print(textile.textile('''bc.. Line1\n\nLine2'''))
<pre>Line1

Line2</pre>