From: Nikos Mavrogiannopoulos Date: Thu, 22 Sep 2016 12:49:57 +0000 (+0200) Subject: gdoc: improved the detection and display of escaped characters (@%) X-Git-Tag: gnutls_3_5_5~63 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8f4dcf8efe02096a782f24e202d5faed60ec94ce;p=thirdparty%2Fgnutls.git gdoc: improved the detection and display of escaped characters (@%) This allows to properly display strings like %COMPAT and @SYSTEM in the manual and the manpages. --- diff --git a/doc/scripts/gdoc b/doc/scripts/gdoc index ceaa214427..5d2d609699 100755 --- a/doc/scripts/gdoc +++ b/doc/scripts/gdoc @@ -134,9 +134,9 @@ use POSIX qw(strftime); # match expressions used to find embedded type information -$type_constant = "\\\%([A-Za-z0-9_]+)"; +$type_constant = '(?$1"'], [$type_func, '"$1"'], [$type_struct, '"$1"'], - [$type_param, '" $1 "'] ); + [$type_param, '" $1 "'], + ['\%\%', '"\%"'] + ); $blankline_html = "

"; @highlights_texinfo = ( [$type_param, '" \@code{$1} "'], [$type_constant, '"\@code{$1} "'], [$type_func, '"\@code{$1} "'], [$type_struct, '"\@code{$1} "'], + ['\%\%', '"\%"'], ); $blankline_texinfo = ""; @@ -162,6 +165,7 @@ $blankline_texinfo = ""; [$type_constant, '"{\\\it $1}"'], [$type_func, '"{\\\bf $1}"'], [$type_struct, '"{\\\it $1}"'], + ['\@\@', '"\@"'] ); $blankline_tex = "\\\\"; @@ -177,14 +181,18 @@ $blankline_sgml = "\n"; @highlights_man = ( [$type_constant, '"\\\fB$1\\\fP"'], [$type_func, '"\\\fB$1\\\fP"'], [$type_struct, '"\\\fB$1\\\fP"'], - [$type_param, '" \\\fI$1\\\fP "'] ); + [$type_param, '" \\\fI$1\\\fP "'], + ['\%\%', '"\%"'], + ['\@\@', '"\@"']); $blankline_man = ""; # text-mode @highlights_text = ( [$type_constant, '"$1"'], [$type_func, '"$1"'], [$type_struct, '"$1"'], - [$type_param, '"$1 "'] ); + [$type_param, '"$1 "'], + ['\%\%', '"\%"'], + ['\@\@', '"\@"']); $blankline_text = ""; my $lineprefix = "";