Index: twikiplugins/LatexModePlugin/lib/TWiki/Plugins/LatexModePlugin/Parse.pm =================================================================== --- twikiplugins/LatexModePlugin/lib/TWiki/Plugins/LatexModePlugin/Parse.pm (Revision 11673) +++ twikiplugins/LatexModePlugin/lib/TWiki/Plugins/LatexModePlugin/Parse.pm (Arbeitskopie) @@ -713,11 +713,11 @@ my $before = ''; - if($txt =~ m!$delim_l!is) { + if($txt =~ m!(.*?)($delim_l)(.*)!is) { $nleft++; - $before = $`; - $umb = $&; - $txt = "$'"; + $before = $1; + $umb = $2; + $txt = $3; # return ($before, $umb,$txt); # my $pl = -1; @@ -725,7 +725,7 @@ while($nright < $nleft) { - if($txt =~ m!$delim_r!is) { + if($txt =~ m!(.*?)($delim_r)(.*)!is) { $nright++; } else { @@ -737,14 +737,14 @@ } - $front = $`; - $umb .= $` . $&; - $txt = "$'"; + $front = $1; + $umb .= $1 . $2; + $txt = $3; #count how many left's are before this right - while($front =~ m!$delim_l!is) { + while($front =~ m!$delim_l(.*)!is) { $nleft++; - $front = "$'"; + $front = $1; } # if($pl == $nleft && $pr == $nright) { # die("Delimiter mismatch!");