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

[BUG] Text interpreted as html tag in markdown gets swallowed. #3565

Open
2 tasks done
brianm78 opened this issue Nov 16, 2024 · 1 comment
Open
2 tasks done

[BUG] Text interpreted as html tag in markdown gets swallowed. #3565

brianm78 opened this issue Nov 16, 2024 · 1 comment

Comments

@brianm78
Copy link

Describe the bug

If markdown contains code with text that could be interpreted as html (eg. using "<" rather than entity escaping it), the text interpreted as a tag deleted. Eg

>>> md = Markdown("Do something if 0<foo or foo>10")
>>> console.print(md)
Do something if 010

Unless there's actual support for html, I think the html_inline rule should be disabled (or if this is used by something, add an option for markdown without html?). Changing the first line of markdown.Markdown.init to:

parser = MarkdownIt().enable("strikethrough").enable("table").disable("html_inline")

Seems to resolve the issue.

Platform

Click to expand

Running on linux, rich 13.9.4, wezterm terminal.

Copy link

Thank you for your issue. Give us a little time to review it.

PS. You might want to check the FAQ if you haven't done so already.

This is an automated reply, generated by FAQtory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant