Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kpot opened this issue Aug 31, 2022 · 0 comments
Open

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

kpot opened this issue Aug 31, 2022 · 0 comments

Comments

@kpot
Copy link

kpot commented Aug 31, 2022

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.

kpot added a commit to kpot/python-textile that referenced this issue Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant