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

Handling abbreviations #28

Closed
pelson opened this issue May 24, 2024 · 3 comments · Fixed by #29
Closed

Handling abbreviations #28

pelson opened this issue May 24, 2024 · 3 comments · Fixed by #29

Comments

@pelson
Copy link

pelson commented May 24, 2024

When formatting Abbreviations, such as the one in the mkdocs docs:

The HTML specification is maintained by the W3C.

*[HTML]: Hyper Text Markup Language
*[W3C]: World Wide Web Consortium

Then mdformat with mdformat-mkdocs converts them to escaped text.

Output:

The HTML specification is maintained by the W3C.

\*\[HTML\]: Hyper Text Markup Language
\*\[W3C\]: World Wide Web Consortium

I would expect this to be unchanged by mdformat-mkdocs.

Tested with Python 3.11:

linkify-it-py   2.0.3
markdown-it-py  3.0.0
mdformat        0.7.17
mdformat_admon  2.0.3
mdformat-gfm    0.3.6
mdformat_mkdocs 2.0.11
mdformat_tables 0.4.1
mdit-py-plugins 0.4.1
mdurl           0.1.2
more-itertools  10.2.0
uc-micro-py     1.0.3

Additionally, I get a warning, which I don't know if it is relevant to this issue:

Warning: Plugin conflict. More than one plugin defined a renderer for "link" syntax.
@KyleKing
Copy link
Owner

Thanks for trying out this plugin and submitting such a clear bug report!

I wasn't aware of that syntax and mdformat-mkdocs will need to be extended to recognize it. I should have some time this weekend to take a look

@KyleKing
Copy link
Owner

KyleKing commented Jun 2, 2024

I've release v2.1.0, which should address formatting Abbreviations, but rendering proper HTML will take more effort. Let me know if this release works for your needs!

@pelson
Copy link
Author

pelson commented Jun 10, 2024

Looks to have done the trick. Thanks!

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

Successfully merging a pull request may close this issue.

2 participants