pirave / postmarkup

Automatically exported from code.google.com/p/postmarkup
0 stars 0 forks source link

Do not insert <br> within <pre> tag #22

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Write a BBCode document that includes [code] block
2. Convert to XHTML
3. Not <br> tags inside <pre> tags.

What is the expected output? What do you see instead?

Expected output is verbatim copy of the text within the [code] tags.

What version of the product are you using? On what operating system?

Python 2.7.1 / postmarkup 1.1.4

Please provide any additional information below.

n/a

Original issue reported on code.google.com by ad...@381chan.org on 15 Jan 2011 at 1:57

GoogleCodeExporter commented 8 years ago
That should be "3. Note <br> tags", sorry

Original comment by ad...@381chan.org on 15 Jan 2011 at 1:58

GoogleCodeExporter commented 8 years ago
Sorry if this is invalid... I'm checking the source code for CodeTag, and I'm 
seeing that it uses _escape_no_breaks, but I'm still getting <br> tags within 
<pre><code>... Trying to figure out why this happens.

Here's the code I'm using to render the HTML:

    postmarkup_object.render_to_html(source,
                                     encoding='UTF-8',
                                     clean=True,
                                     paragraphs=True,
                                     exclude_tags=['img'])

Original comment by ad...@381chan.org on 15 Jan 2011 at 2:08

GoogleCodeExporter commented 8 years ago
Ok, this is definitely invalid. I forgot to add `use_pygments=False`.

Original comment by ad...@381chan.org on 15 Jan 2011 at 2:45

GoogleCodeExporter commented 8 years ago
No problem.

Original comment by willmcgugan on 4 Dec 2011 at 9:40