@@ -258,13 +258,15 @@ def test_github_issue_55():
258258 'return configs;\n }\n }</pre>' )
259259 assert result == expect
260260
261- def test_issue_56 ():
261+ def test_github_issue_56 ():
262+ """Empty description lists throw error"""
262263 result = textile .textile ("- :=\n -" )
263264 expect = '<dl>\n </dl>'
264265 assert result == expect
265266
266- def test_github_issue_57 ():
267- input = '''bc.. This is some TEXT inside a "Code BLOCK"
267+ def test_github_pull_61 ():
268+ """Fixed code block multiline encoding on quotes/span"""
269+ test = '''bc.. This is some TEXT inside a "Code BLOCK"
268270
269271{
270272 if (JSON) {
@@ -294,11 +296,13 @@ def test_github_issue_57():
294296
295297<p>Here is some output!!! “Some” <span class="caps">CAPS</span></p>'''
296298 t = textile .Textile ()
297- result = t .parse (input )
299+ result = t .parse (test )
298300 assert result == expect
299301
300- def test_issue_58 ():
301- input = '''p.. First one 'is'
302+ def test_github_pull_62 ():
303+ """Fix for paragraph multiline, only last paragraph is rendered
304+ correctly"""
305+ test = '''p.. First one 'is'
302306
303307ESCAPED "bad"
304308
@@ -334,5 +338,70 @@ def test_issue_58():
334338
335339<p><span class="caps">ESCAPED</span> “good” test</p>'''
336340 t = textile .Textile ()
337- result = t .parse (input )
341+ result = t .parse (test )
342+ assert result == expect
343+
344+ def test_github_pull_63 ():
345+ """Forgot to set multiline_para to False"""
346+ test = '''p.. First one 'is'
347+
348+ ESCAPED "bad"
349+
350+ bc.. {
351+ First code BLOCK
352+
353+ {"JSON":'value'}
354+ }
355+
356+ p.. Second one 'is'
357+
358+
359+
360+ ESCAPED "bad"
361+
362+ p.. Third one 'is'
363+
364+ ESCAPED "bad"
365+
366+ bc.. {
367+ Last code BLOCK
368+
369+ {"JSON":'value'}
370+ }
371+
372+ p.. Last one 'is'
373+
374+ ESCAPED "good" test'''
375+
376+ expect = '''<p>First one ‘is’</p>
377+
378+ <p><span class="caps">ESCAPED</span> “bad”</p>
379+
380+ <pre><code>{
381+ First code BLOCK
382+
383+ {"JSON":'value'}
384+ }</code></pre>
385+
386+ <p>Second one ‘is’</p>
387+
388+
389+
390+ <p><span class="caps">ESCAPED</span> “bad”</p>
391+
392+ <p>Third one ‘is’</p>
393+
394+ <p><span class="caps">ESCAPED</span> “bad”</p>
395+
396+ <pre><code>{
397+ Last code BLOCK
398+
399+ {"JSON":'value'}
400+ }</code></pre>
401+
402+ <p>Last one ‘is’</p>
403+
404+ <p><span class="caps">ESCAPED</span> “good” test</p>'''
405+ t = textile .Textile ()
406+ result = t .parse (test )
338407 assert result == expect
0 commit comments