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

mdformat-pelican conflicts with mdformat-gfm #38

Open
kdeldycke opened this issue Apr 14, 2024 · 1 comment
Open

mdformat-pelican conflicts with mdformat-gfm #38

kdeldycke opened this issue Apr 14, 2024 · 1 comment

Comments

@kdeldycke
Copy link
Contributor

A vanilla mdformat is messing with Pelican curly-braces variables and replacing them with % URL escape codes:

$ pipx install mdformat
(...)

$ mdformat --version
mdformat 0.7.17 (mdformat_web: 0.1.0)
$ cat ./test.md
![My photo]({attach}photo.jpg)
$ mdformat ./test.md
$ cat ./test.md
![My photo](%7Battach%7Dphoto.jpg)

That's why we have mdformat-pelican, and it works as expected:

$ pipx inject mdformat mdformat-pelican
  injected package mdformat-pelican into venv mdformat
done! ✨ 🌟 ✨

$ mdformat --version
mdformat 0.7.17 (mdformat_pelican: 0.1.0, mdformat_web: 0.1.0)
$ mdformat ./test.md
$ cat ./test.md
![My photo]({attach}photo.jpg)

Unformtunately, mdformat-pelican is not compatible with the addition of mdformat-gfm plugin:

$ pipx inject mdformat mdformat-gfm
  injected package mdformat-gfm into venv mdformat
done! ✨ 🌟 ✨

$ mdformat --version
mdformat 0.7.17 (mdformat_tables: 0.4.1, mdformat_gfm: 0.3.6, mdformat_pelican: 0.1.0, mdformat_web: 0.1.0)

$ mdformat ./test.md
Warning: Plugin conflict. More than one plugin defined a renderer for "link" syntax.

This has also been posted at: gaige/mdformat-pelican#3

@kdeldycke
Copy link
Contributor Author

A hackish fix has been proposed in: gaige/mdformat-pelican#4

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