-
Notifications
You must be signed in to change notification settings - Fork 32
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
Admonition title syntax is not consistent with other implementation #93
Comments
Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗 |
Pinging @KyleKing (who worked on this plugin 😄 ) |
Thanks for reporting the bug. It may be straightforward to remove the outer quotes from the matched admonition title, and I'll separately take a look at the CSS classes since those seem pretty generic |
I have a PR that should resolve the problem in: #94 I'll take a look at the HTML roles next |
For reference, here is a quick patch I made, probably redundant with yours. |
Got the HTML roles too 👍🏻 @chrisjsewell #94 is ready for review. I'm happy to split off the |
Some clarifications about this point. This is the syntax documented in mkdocs-material. This implementation supports multiple token after !!! info inline end "Lorem ipsum"
Lorem ipsum dolor sit amet, consectetur
adipiscing elit. Nulla et euismod nulla.
Curabitur feugiat, tortor non consequat
finibus, justo purus auctor massa, nec
semper lorem quam in massa. Which gives: <div class="admonition info inline end"> <p class="admonition-title">Lorem ipsum</p> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor massa, nec semper lorem quam in massa.</p> </div> |
My PR attempts to provides this but introduces a breaking change for this reason. |
This syntax is what is implemented in Python Markdown in practice (though not documented?):
|
Notice in particuliar how the Python-Markdown implementation handles trailing
|
I just saw your replies here. I think we should be able to avoid a breaking change if double quotes aren't present, but I'll need to check locally |
Kindly ping. Need help on this? |
The PR is done and awaiting review. @chrisjsewell, when you have a chance, could you please review and release this change: #94? |
FYI: this change will be released in the next version of |
Describe the bug
context
The admonition syntax is based on Python Markdown:
expectation
I would expect the quotes to be absent from the output.
bug
With mdit-py-plugins, the quotes are present in the output:
Unexpected output generated by mdit-py-plugins (spurious quotes):
Moreover, the additional CSS classes are not supported either.
Changing the behavior might cause compatiblity issues with markdown-it-admon however.
problem
This is a problem for people migrating from Python Markdown.
Reproduce the bug
Create markdown file with:
Create script
Run:
python3 test.py < test.md
Output:
List your environment
The text was updated successfully, but these errors were encountered: