summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Schillinger <max@mxsr.de>2023-10-30 17:44:52 +0100
committerDrew DeVault <sir@cmpwn.com>2023-10-31 08:12:15 +0100
commitca7aad3e74178dda6ff93cadd962594ae0a2c174 (patch)
treef2b47fc81057e48e0d4ff6bcf493e855643bbc7e
parent0b4a102bcf5408896c237a2c35ca7663f8d84ff2 (diff)
fix formatting of escaped backticks
Currently, an escaped backtick (\`) is translated to \\` which gets rendered as "Left Single Quotation Mark" (‘) (for a UTF-8 locale). This commit translates \` to \` which results in an actual backtick in the rendered man page.
-rw-r--r--src/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 0030fdc..a49cb40 100644
--- a/src/main.c
+++ b/src/main.c
@@ -209,6 +209,8 @@ static void parse_text(struct parser *p) {
parser_fatal(p, "Unexpected EOF");
} else if (ch == '\\') {
fprintf(p->output, "\\e");
+ } else if (ch == '`') {
+ fprintf(p->output, "\\`");
} else {
utf8_fputch(p->output, ch);
}