scdoc2mdoc

A fork of scdoc to output mdoc(7)
git clone git://git.sgregoratto.me/scdoc2mdoc
Log | Files | Refs | README | LICENSE

commit 44c618230fa7b2acdbcaf785c35f0463030f2651
parent 789dad3a35edd6d0a1cef4764c039b4c76068636
Author: Drew DeVault <sir@cmpwn.com>
Date:   Sun, 10 Dec 2017 02:40:20 -0500

Fix bug with ` within literal blocks

These would previously be eaten if not escaped.

Diffstat:
Mscdoc.1.scd | 4++--
Msrc/main.c | 5++++-
2 files changed, 6 insertions(+), 3 deletions(-)

diff --git 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 @@ -234,7 +234,10 @@ static void parse_literal(struct parser *p, int *indent) { return; } } else { - stops = 0; + while (stops != 0) { + fputc('`', p->output); + --stops; + } switch (ch) { case '.': fprintf(p->output, "\\&.");