Skip to content

Wrong HTML output when "bc.." is the very last in the document #81

@kpot

Description

@kpot

Hi!

Given the following Textile document (in a form of a Python string):

bc.. Paragraph 1\n\nParagraph 2\n\nParagraph 3

python-textile outputs

"<pre>Paragraph 1\n\nParagraph 2\n\nParagraph 3</pre>"

When it should be producing

"<pre><code>Paragraph 1\n\nParagraph 2\n\nParagraph 3</code></pre>"

This happens only when the "bc.." block is the very last or the only block of the document. If it is followed by anything else, say a p. Extra text block, the resulting HTML is correct.

I'm currently working on porting python-textile to Rust, so I'm quite familiar with the code and plan to fix the bug myself. I'll send a PR with some extra tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions