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

parsed-literal does not preserve code-highlighting #854

Open
LecrisUT opened this issue Jan 2, 2024 · 2 comments
Open

parsed-literal does not preserve code-highlighting #854

LecrisUT opened this issue Jan 2, 2024 · 2 comments
Labels
question Further information is requested

Comments

@LecrisUT
Copy link

LecrisUT commented Jan 2, 2024

I am not sure if this is a bug or documentation issue. Basically I saw CMake's documentation that uses parsed-literal, and I wanted to port that design to my myst documentation. But I cannot get the code-highlighting to detect the language correctly. I don't know if there is a specific that should be enabled for that or is this specific to RST?

@chrisjsewell
Copy link
Member

But I cannot get the code-highlighting to detect the language correctly

Heya, I'm a bit confused what you mean by this? parsed-literal will parse the containing block as MyST, it is not for code highlighting: https://docutils.sourceforge.io/docs/ref/rst/directives.html#parsed-literal-block

@chrisjsewell chrisjsewell added the question Further information is requested label Jan 12, 2024
@LecrisUT
Copy link
Author

From what I've read on forums it is only supposed to parse its known markups like the links. For myst, it does do that, but steadily then the code highlighting is lost.

Alternatively would it be possible to code something to markup only markdown links (reference style links or autolinks might be tricky) and pass everything else to either code-highlight parser?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants