From: zack Date: Wed, 26 Jun 2002 16:50:04 +0000 (+0000) Subject: * texi2pod.pl: Correct handling of the internal R<> sequence. X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=commitdiff_plain;h=f1683556b095de77493775dcd5a3c36958de54b6 * texi2pod.pl: Correct handling of the internal R<> sequence. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55012 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/contrib/ChangeLog b/contrib/ChangeLog index 3582317c64e..14da30497f3 100644 --- a/contrib/ChangeLog +++ b/contrib/ChangeLog @@ -1,3 +1,7 @@ +2002-06-26 Zack Weinberg + + * texi2pod.pl: Correct handling of the internal R<> sequence. + 2002-05-31 Florian Weimer * gcc_update (files_and_dependencies): Add generated Texinfo files diff --git a/contrib/texi2pod.pl b/contrib/texi2pod.pl index 4fb8892ccb8..e5560f303de 100755 --- a/contrib/texi2pod.pl +++ b/contrib/texi2pod.pl @@ -365,14 +365,18 @@ sub postprocess s/\@uref\{([^\},]*),([^\},]*)\}/$2 (C<$1>)/g; s/\@uref\{([^\},]*),([^\},]*),([^\},]*)\}/$3/g; - # Turn B blah> into B I B to - # match Texinfo semantics of @emph inside @samp. Also handle @r - # inside bold. + # Un-escape <> at this point. s/<//g; - 1 while s/B<((?:[^<>]|I<[^<>]*>)*)R<([^>]*)>/B<$1>${2}B]*)I<([^>]+)>/B<$1>I<$2>B]*)B<([^>]+)>/I<$1>B<$2>I, I<>, R<>. Theoretically we could have + # indefinitely deep nesting; in practice, one level suffices. + 1 while s/([BIR])<([^<>]*)([BIR])<([^<>]*)>/$1<$2>$3<$4>$1 with bare ...; eliminate empty markup, B<>; + # shift white space at the ends of [BI]<...> expressions outside + # the expression. + s/R<([^<>]*)>/$1/g; s/[BI]<>//g; s/([BI])<(\s+)([^>]+)>/$2$1<$3>/g; s/([BI])<([^>]+?)(\s+)>/$1<$2>$3/g;