format-intf modifie' pour echapper les [ et ]
git-svn-id: http://caml.inria.fr/svn/ocamldoc/trunk@9765 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02master
parent
18be0988c6
commit
5d7722c983
|
@ -69,13 +69,15 @@ while(<>) {
|
|||
}
|
||||
s/^\s*//;
|
||||
$count = 0;
|
||||
foreach $part (split(/([\[\]])/, $_)) {
|
||||
foreach $part (split(/(\\?[\[\]])/, $_)) {
|
||||
if ($part eq "[") {
|
||||
print ($count == 0 ? "\\verb`" : "[");
|
||||
$count++;
|
||||
} elsif ($part eq "]") {
|
||||
$count--;
|
||||
print ($count == 0 ? "`" : "]");
|
||||
} elsif ($part =~ m/^\\([\[\]])$/) {
|
||||
print $1;
|
||||
} else {
|
||||
print $part;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue