- edited description
Markdown: fenced code block within block quote loses quotes after one line
When there is a fenced code block (the lines sandwiched between the lines of the three backslashes) is placed in a block quote (a block of lines where each line starts with a block quote marker '> ' ) as in:
> quoted block
> ```
> code line 1
> code line 2
> code line 3
> ```
> fenced block ended above
>
The block quote ended above.
only the first line of of the fenced lines retains the block quote marker after extraction and merge. All lines after the first line of the fenced block lose the marker including the lines after the fenced block.
> quoted block
> ```
> code line 1
code line 2
code line 3
```
fenced block ended above
The block quote ended above.
To reproduce, use the attached quoted-fenced-block.md:
./tikal.sh -x quoted-fenced-block.md
./tikal.sh -m quoted-fenced-block.md.xlf
The resulting quoted-fenced-block.md.out.md doesn't have the block quote marker after the first line of the fenced block.
A error message "Something's not right in block quote...." is observed on both runs of tikal.sh.
Reference: https://spec.commonmark.org/0.28/#fenced-code-blocks
Comments (6)
-
reporter -
reporter - attached quoted-blocks.md
quoted-blocks.md includes triply nested block quote and quoted fenced block. The nested block quote loses the block quote marker as well. The quick code inspection suggests the current code is not prepared for quoting another block.
-
reporter - changed version to M37
When there is a fenced code block (the lines sandwiched between the lines of the three backslashes) is placed in a block quote (a block of lines where each line starts with a block quote marker '> ' ) as in:
> quoted block > ``` > code line 1 > code line 2 > code line 3 > ``` > fenced block ended above > The block quote ended above.
only the first line of of the fenced lines retains the block quote marker after extraction and merge. All lines after the first line of the fenced block lose the marker including the lines after the fenced block.
> quoted block > ``` > code line 1 code line 2 code line 3 ``` fenced block ended above The block quote ended above.
To reproduce, use the attached quoted-fenced-block.md:
./tikal.sh -x quoted-fenced-block.md ./tikal.sh -m quoted-fenced-block.md.xlf
The resulting quoted-fenced-block.md.out.md doesn't have the block quote marker after the first line of the fenced block.
A error message "Something's not right in block quote...." is observed on both runs of tikal.sh.
Reference: https://spec.commonmark.org/0.28/#fenced-code-blocks
-
reporter This bug fix will not address related issue #704. Only the code blocks that don’t have leading spaces will be handled properly.
Other related bugs:
-
reporter - changed status to resolved
Merged in ssikuro/okapi/fix_issue_817 (pull request #318)
Fix issue 817 (fenced code block within block quote)
Approved-by: YvesS yves@opentag.com
→ <<cset 6fe0b32bda3e>>
-
reporter Fixed in pull request #318.
- Log in to comment