diff --git a/markdown.dtx b/markdown.dtx index 8d85724d0..dfa2c139e 100644 --- a/markdown.dtx +++ b/markdown.dtx @@ -15211,6 +15211,7 @@ parsers.commented_line = Cs(((parsers.linechar * parsers.percent + parsers.backslash * (parsers.linechar + + parsers.newline - parsers.backslash - parsers.percent)) )^0) diff --git a/tests/testfiles/lunamark-markdown/no-strip-comments.test b/tests/testfiles/lunamark-markdown/no-strip-comments.test index 12774040f..f24b05507 100644 --- a/tests/testfiles/lunamark-markdown/no-strip-comments.test +++ b/tests/testfiles/lunamark-markdown/no-strip-comments.test @@ -1,9 +1,16 @@ <<< This test ensures that the Lua `stripComments` option is disabled by default. -The following *emphasi% this is a comment - zed text* should be interrupted and this *emphasi\% another one + +The following *emphasi% this is a comment + zed text* should be interrupted and this *emphasi\% another one zed text* should also be interrupted. + +A single backslash at the *end of \ +a line* should be allowed by the preprocessor. >>> codeSpan: stripComments +interblockSeparator emphasis: emphasi(percentSign) this is a comment zed text emphasis: emphasi(backslash)(percentSign) another one zed text +interblockSeparator +emphasis: end of (backslash) a line diff --git a/tests/testfiles/lunamark-markdown/strip-comments.test b/tests/testfiles/lunamark-markdown/strip-comments.test index 3def73e8f..5f43a1711 100644 --- a/tests/testfiles/lunamark-markdown/strip-comments.test +++ b/tests/testfiles/lunamark-markdown/strip-comments.test @@ -1,16 +1,24 @@ \def\markdownOptionStripComments{true} <<< This test ensures that the Lua `stripComments` option correctly propagates -through the plain TeX interface. The following *emphasi% this is a comment - zed text* should be uninterrupted, whereas this *emphasi\% another one +through the plain TeX interface. + +The following *emphasi% this is a comment + zed text* should be uninterrupted, whereas this *emphasi\% another one zed text* should be interrupted. The following *emphasi% this is a comment zed text* should be broken into two paragraphs. + +A single backslash at the *end of \ +a line* should be allowed by the preprocessor. >>> codeSpan: stripComments +interblockSeparator emphasis: emphasized text emphasis: emphasi(percentSign) another one zed text interblockSeparator interblockSeparator +interblockSeparator +emphasis: end of (backslash) a line