executablebooks / MyST-Parser

An extended commonmark compliant parser, with bridges to docutils/sphinx
https://myst-parser.readthedocs.io
MIT License
714 stars 191 forks source link

MyST Parser doesn't recognize custom roles #576

Open TsukiZombina opened 2 years ago

TsukiZombina commented 2 years ago

Describe the bug

When I try to use roles for defining colors with rST, for example: :green:text, it changes de color of the text.

With MyST parser I tried something like: {green}text, I expected the text to change to green too.

But instead, it creates a reference to that word with id1.

I included the file where all the roles are, this just happens in MyST.

Reproduce the bug

  1. I used s5defs.txt file.
  2. Following these instructions to add custom CSS.
  3. Then I tried in an .rST file, :green:text, without problems.
  4. Later {green}text in an md file with MyST that showed the reference.

List your environment

OS: Windows 11 Python: 3.7.11 Sphinx: 4.4.0 MyST-Parser:0.17.0

welcome[bot] commented 2 years ago

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada: