md4c icon indicating copy to clipboard operation
md4c copied to clipboard

A closing code fence followed by a tab is not recognised

Open manowicz opened this issue 5 months ago • 0 comments

Hi,

I've run into an issue with the following Markdown file:

```
a
```\t
b

I've printed it verbatim for readability, but "\t" is the tab character, i.e. ASCHII code 9. The byte contents of this file are:

96, 96, 96, 10, 97, 10, 96, 96, 96, 9, 10, 98

md4c doesn't recognise the closing code fence, so it treats the whole file as a single code block.

To quote the CommonMark spec,

The closing code fence may be preceded by up to three spaces of indentation, and may be followed only by spaces or tabs, which are ignored.

This suggest that the closing fence should be recognised. Is this a bug, or am I misunderstanding something? I haven't found a flag that controls this behaviour.

manowicz avatar Jul 28 '25 16:07 manowicz