parsed-literal
environment does not respect leading whitespace
#1016
Labels
bug
Something isn't working
parsed-literal
environment does not respect leading whitespace
#1016
What version of
myst-parser
are you using?4.0.0
What version dependencies are you using?
sphinx==8.1.3
sphinx-argparse==0.5.2
sphinx_design==0.6.1
pydata-sphinx-theme==0.16.0
myst-parser==4.0.0
docutils==0.21.2
What operating system are you using?
Windows
Describe the Bug
When attempting to use the
parsed-literal
directive with MyST, leading whitespace isn't respected as it should be.For example, attempting to display the following fails:
being incorrectly displayed as
This incorrect behavior only occurs with
parsed-literal
.code
andcode-block
directives behave correctly. This breaks circumstances whereparsed-literal
is necessary for maintaining whitespace while allowing parseable behavior (e.g., for reference links).Expected Behavior
Whitespace should be preserved, maintaining parity with reStructuredText. E.g., should be the same as
which produces the following, as desired:
To Reproduce
parsed-literal
block containing lines with leading whitespaceThe text was updated successfully, but these errors were encountered: