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
On the first glance, this issue seems related to issue #42, where the util.cache_verbatim() function uses the string:gsub('[\r\n%s]*$', '') command to remove trailing newlines and spaces. However, since string is the entire code block and $corresponds to "the end of the subject string", this does not account for the removal of spaces in the second line of the example code block.
Therefore, I looked into file ./_markdown_test/baeeb37d6c9237faa1bcd55e3102e279.verbatim:
$ cat _markdown_test/baeeb37d6c9237faa1bcd55e3102e279.verbatim | sed 's/ /<space>/g'
chunk1
<space><space>chunk2
This indicates that the issue is with the parsers.blanklines PEG pattern used in patterns.Verbatim, which replaces any blank line, together with spaces, with \n. On the first glance, the solution seems to be to remove parsers.blanklines from patterns.Verbatim and use just parsers.indentedline. However, this would make any non-indented blank lines break a code block, breaking e.g. example 111. Therefore, we may need to replace parsers.blanklines in patterns.Verbatim with the parsers.skipblanklines PEG pattern, which is equivalent to parsers.blanklines but does not do any replacements.
See https://spec.commonmark.org/0.30/#example-112
The text was updated successfully, but these errors were encountered: