Fixed a mismatch of nested brackets in the documentation generation tools from doxygen comments.

This commit is contained in:
Nico Kruithof 2010-03-13 09:01:18 +00:00
parent fe941f657c
commit 880ebfda08
1 changed files with 11 additions and 2 deletions

View File

@ -165,6 +165,11 @@ sub latex_unmangle
$buf =~ s/ +\n/\n/g;
# Convert buffer back to Doxygen 1.5.5 format
# remove nested brackets
if ($buf =~ m/\\paragraph\[([^\]]*?)\[[^\[\]]*?\](.*?)\]/)
{
$buf =~ s/\\paragraph\[([^\]]*?)\[[^\[\]]*?\](.*?)\]/\\paragraph\[$1$2\]/g;
}
$buf =~ s/\\paragraph\[.*?\]/\\paragraph/g; # remove \paragraph[...] -> \paragraph
# Unmangle comma (,), _, ~, <, >, *, &, [] characters mangled for Latex
@ -200,8 +205,12 @@ sub latex_unmangle
$buf =~ s/\{\\footnotesize\s+(.*?)\s*\}\\\\/$1/smg;
# replace {\footnotesize xxx} by xxx
}
#
$buf =~ s/\\index\{[^\\]*\}//g; # remove \index{...}
# remove nested braces
while ($buf =~ m/\\index\{([^\}]*?)\{[^\{\}]*?\}(.*?)\}/)
{
$buf =~ s/\\index\{([^\}]*?)\{[^\{\}]*?\}(.*?)\}/\\index\{$1$2\}/g;
}
$buf =~ s/\\index\{.*?\}//g; # remove \index{...}
$buf =~ s/\\setlength\{\\rightskip\}\{0pt plus 5cm\}//g;
# remove \setlength{\rightskip}{0pt plus 5cm}