foxygit / doom Log in
commit 9e731e2b2b03d361a477f4c0ce4da830c1a71312
Author:     Michael Day <43701387+mikeday0@users.noreply.github.com>
AuthorDate: Wed Apr 29 07:03:30 2026 -0400
Commit:     GitHub <noreply@github.com>
CommitDate: Wed Apr 29 13:03:30 2026 +0200

    docgen: Fix Python SyntaxWarning (#1793)

    Properly escape backslashes in docgen manpage markup strings.
---
 man/docgen | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/man/docgen b/man/docgen
index 6c1761a7..8760e8f7 100755
--- a/man/docgen
+++ b/man/docgen
@@ -245,13 +245,13 @@ class Parameter:
             # Special cases -- GBR is not proud.
             if self.args == "[<x> <y> | <xy>]":
                 result = ".BR " + self.name + " \\~\\c\n" \
-                    + ".RI [ x\~y | xy ]\n"
+                    + ".RI [ x\\~y | xy ]\n"
             elif self.args == "<WxH>":
                 result = ".BI " + self.name + "\\~ W x H\n"
             elif self.args == "<x> <y>":
                 result = ".BI " + self.name + "\\~ \"x y\"\n"
             elif self.args == "<files>":
-                result = ".BI " + self.name + "\\~ \"file\\~\c\n" \
+                result = ".BI " + self.name + "\\~ \"file\\~\\c\n" \
                     + "\\&.\\|.\\|.\n"
             elif self.args == "<save-num> <demo-name>":
                 result = ".BI " + self.name \