From 44c618230fa7b2acdbcaf785c35f0463030f2651 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Sun, 10 Dec 2017 02:40:20 -0500 Subject: [PATCH] Fix bug with ` within literal blocks These would previously be eaten if not escaped. --- scdoc.1.scd | 4 ++-- src/main.c | 5 ++++- diff --git a/scdoc.1.scd b/scdoc.1.scd index 556c326301d7f16ba4ce8fe11d29fe9aaf009b53..ca1afa0896f82ff2d206d1b096d3c71158bb60f3 100644 --- a/scdoc.1.scd +++ b/scdoc.1.scd @@ -85,9 +85,9 @@ to be treated as a literal and copied directly to the output. You may also make blocks of literal syntax like so: ``` -\`\`\` +\``` _This formatting_ will *not* be interpreted by scdoc. -\`\`\` +\``` ``` These blocks will be indented one level. Note that literal text is shown diff --git a/src/main.c b/src/main.c index e5a9a6a210b9ccd352940b24db5efb08bac050f6..da63b5077c9f6619aea565191aeb9b879ba8fd99 100644 --- a/src/main.c +++ b/src/main.c @@ -234,7 +234,10 @@ roff_macro(p, "RE", NULL); return; } } else { - stops = 0; + while (stops != 0) { + fputc('`', p->output); + --stops; + } switch (ch) { case '.': fprintf(p->output, "\\&."); -- 2.48.1