You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MyST parser does not have proper syntax for line-block and emulates line-block by creating paragraph with hardbreaks (indicated by \ followed by linebreak). This introduces incompatibility in some (perhaps uncommon, but valid) cases. One of them is table with line-block:
# Test text block inside list-table
## list-table
```{list-table}
* - A1
- B1 \
in \
3 lines
* - A2
- B2
```
## list-table via eval-rst
```{eval-rst}
.. list-table::
* - A1
- | B1
| in
| 3 lines
* - A2
- B2
```
The first table will be rendered incorrectly (as the B1 cell is a paragraph node with newlines inserted as raw latex \\ which has a different meaning inside table; whereas RST will process line_block node inside table with lines correctly).
(proposed behavior:) paragraph with hardbreaks and no softbreaks would be converted to line_block. Paragraph mixing hardbreaks and softbreaks would trigger warning. Paragraphs with softbreak only are just paragraphs.
Or alternatively, document another way of creating line_block in MyST (I did not find one).
To Reproduce
Compile the above source (saved as index.md) with this minimal conf.py:
project="test"extensions=['myst_parser']
The text was updated successfully, but these errors were encountered:
What version of
myst-parser
are you using?2.0.0
What version dependencies are you using?
docutils==0.20.1
sphinx==7.2.6
What operating system are you using?
Linux
Describe the Bug
MyST parser does not have proper syntax for line-block and emulates line-block by creating paragraph with hardbreaks (indicated by
\
followed by linebreak). This introduces incompatibility in some (perhaps uncommon, but valid) cases. One of them is table with line-block:The first table will be rendered incorrectly (as the B1 cell is a
paragraph
node with newlines inserted as raw latex\\
which has a different meaning inside table; whereas RST will processline_block
node inside table withline
s correctly).The pseudoXML is here:
Expected Behavior
(proposed behavior:) paragraph with hardbreaks and no softbreaks would be converted to
line_block
. Paragraph mixing hardbreaks and softbreaks would trigger warning. Paragraphs with softbreak only are just paragraphs.Or alternatively, document another way of creating
line_block
in MyST (I did not find one).To Reproduce
Compile the above source (saved as
index.md
) with this minimalconf.py
:The text was updated successfully, but these errors were encountered: