From 99da00930822412100234cf85bbf5e79d5ca8b6f Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sat, 30 Aug 2025 19:39:24 +0100 Subject: [PATCH] wikiheaders: Escape backslash in man pages Otherwise, groff will interpret it as a macro, causing the man page for SDL_GetPrefPath() to be mis-rendered. Escape unescaped backslashes as `\(rs` ("reverse solidus") before escaping other characters with macros that, themselves, contain backslashes. Resolves: https://github.com/libsdl-org/SDL/issues/13039 Signed-off-by: Simon McVittie --- build-scripts/wikiheaders.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/build-scripts/wikiheaders.pl b/build-scripts/wikiheaders.pl index 4dd44f818b..768f42c83c 100755 --- a/build-scripts/wikiheaders.pl +++ b/build-scripts/wikiheaders.pl @@ -436,6 +436,7 @@ sub dewikify_chunk { } } elsif ($dewikify_mode eq 'manpage') { # make sure these can't become part of roff syntax. + $str =~ s/\\/\\(rs/gms; $str =~ s/\./\\[char46]/gms; $str =~ s/"/\\(dq/gms; $str =~ s/'/\\(aq/gms;