-
Notifications
You must be signed in to change notification settings - Fork 430
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
Markdown Syntax Not Converted Within HTML Tags in markdown2 #546
Comments
Have you tried the |
Thank you for suggesting the Do you have any other suggestions or workarounds that might help in this situation? Alternatively, are you aware of any other Markdown processors that might better handle this kind of nested Markdown within HTML? I appreciate your input and assistance on this. |
My bad, I didn't realise that this limitation existed. I've opened a PR to address this. Let me know if that addresses the use case. |
Update `markdown-in-html` extra to handle markdown on same line as HTML (#546)
- The "^" specifier is often too restrictive for 0.* versions so I would not recommend to use it in these cases: https://python-poetry.org/docs/dependency-specification/ - Markdown2: The issue from 2.4.11 was fixed in 2.4.12: - zauberzeug#2154 - trentm/python-markdown2#546 - https://github.com/trentm/python-markdown2/blob/master/CHANGES.md#python-markdown2-2412 - Watchfiles: Doesn't look like v1 will introduce breaking changes: samuelcolvin/watchfiles#186 - python-multipart: "^0.06" is "==0.0.6" which is too strict and at this stage, any release can potentially add breaking changes - aiofiles: Uses CalVer and 24.0.0 is as likely to introduce breaking changes as 23.2.0. - httpx: It does not look like 1.0.0 will introduce breaking changes (if you already fixed any deprecation warnings). Testing against the 1.0.0beata0 is advisable, though. encode/httpx#3069 - ifaddr: Development is rather slow, package looks quite stable. I don't think that a 0.3.0 will add breaking changes and a 1.0 is not in sight. - pytest-asyncio: Restriction to >=0.19,<0.20 seems unwanted and updates are needed for recent pytest versions - pytest: Has there been a reason to not support pytest7? pytest8 currently breaks some plugins, but this should be fixed soon. Fixes: zauberzeug#2485
Description
When using the
markdown2
library to convert Markdown to HTML, I've noticed that Markdown syntax is not being converted inside HTML tags. Specifically, the bold syntax**text**
within<p>
tags is not converted to<strong>
HTML tags as expected. This issue seems to affect Markdown syntax within any HTML tag, not just paragraph tags.Steps to Reproduce
markdown2
library to convert a string that contains both HTML and Markdown syntax. For example, a string with paragraph tags<p>
containing Markdown bold syntax**
.Expected Behavior
Markdown syntax within HTML tags should be converted to their respective HTML tags. For example,
**text**
within<p>
tags should become<p><strong>text</strong></p>
.Actual Behavior
The Markdown syntax within HTML tags remains unchanged in the output HTML. For example,
**text**
within<p>
tags stays as<p>**text**</p>
.Environment
Additional Information
markdown2
.Code to Reproduce
The text was updated successfully, but these errors were encountered: