mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-01-06 21:37:47 +00:00
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 <smcv@collabora.com>
This commit is contained in:
committed by
Ryan C. Gordon
parent
5505cb2bb9
commit
99da009308
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user