From ca7aad3e74178dda6ff93cadd962594ae0a2c174 Mon Sep 17 00:00:00 2001 From: Max Schillinger Date: Mon, 30 Oct 2023 17:44:52 +0100 Subject: [PATCH] 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. --- src/main.c | 2 ++ diff --git a/src/main.c b/src/main.c index 0030fdcdd2fe5aff392a06717292525b12ea7851..a49cb401769df9e694fb547fa8a7d939b13ed818 100644 --- a/src/main.c +++ b/src/main.c @@ -209,6 +209,8 @@ if (ch == UTF8_INVALID) { parser_fatal(p, "Unexpected EOF"); } else if (ch == '\\') { fprintf(p->output, "\\e"); + } else if (ch == '`') { + fprintf(p->output, "\\`"); } else { utf8_fputch(p->output, ch); } -- 2.48.1