Closed AmauryCarrade closed 3 years ago
If we use the space-separated syntax in hl_lines, the LaTeX export breaks.
hl_lines
Let there be the following input.
```python hl_lines="1-2 4" def true(): return False True = true()
We expect the following LaTeX output: ```latex \begin{CodeBlock}[][1-2 4]{python} def true(): return False True = true() \end{CodeBlock}
Instead, we get:
\begin{CodeBlock}[]["2-1]{python} def true(): return False True = true() \end{CodeBlock}
You can reproduce this bug here.
It looks like this is caused by this parameters separation based on spaces, without taking into account quotes (line 29).
https://github.com/zestedesavoir/zmarkdown/blob/0dde7e4bc207cd5a34fe73da4cf9bb90c8ad745d/packages/rebber/src/types/code.js#L23-L30
Was fixed with the refactoring of meta attributes on code blocks, will be included in ZMd 10.0.
If we use the space-separated syntax in
hl_lines
, the LaTeX export breaks.Steps to reproduce
Let there be the following input.
Instead, we get:
You can reproduce this bug here.
Analysis
It looks like this is caused by this parameters separation based on spaces, without taking into account quotes (line 29).
https://github.com/zestedesavoir/zmarkdown/blob/0dde7e4bc207cd5a34fe73da4cf9bb90c8ad745d/packages/rebber/src/types/code.js#L23-L30