Fixed some formatting issues that prevented ** and ## from working.

This commit is contained in:
mchurch 2004-09-02 18:43:23 +00:00
parent 9c945552fb
commit 24223b9eb7
2 changed files with 12 additions and 12 deletions

View file

@ -1913,6 +1913,17 @@ function ewiki_format (
} }
#-- text style triggers
foreach ($wm_style as $find=>$replace) {
$find_len = strlen($find);
$loop = 20;
while(($loop--) && (($l = strpos($line, $find)) !== false) && ($r = strpos($line, $find, $l + $find_len))) {
$line = substr($line, 0, $l) . $replace[0] .
substr($line, $l + strlen($find), $r - $l - $find_len) .
$replace[1] . substr($line, $r + $find_len);
}
}
#-- list markup #-- list markup
if (isset($wm_list[$c0])) { if (isset($wm_list[$c0])) {
@ -1981,17 +1992,6 @@ function ewiki_format (
} }
#-- text style triggers
foreach ($wm_style as $find=>$replace) {
$find_len = strlen($find);
$loop = 20;
while(($loop--) && (($l = strpos($line, $find)) !== false) && ($r = strpos($line, $find, $l + $find_len))) {
$line = substr($line, 0, $l) . $replace[0] .
substr($line, $l + strlen($find), $r - $l - $find_len) .
$replace[1] . substr($line, $r + $find_len);
}
}
#-- start-end markup #-- start-end markup
foreach ($wm_start_end as $d) { foreach ($wm_start_end as $d) {
$len0 = strlen($d[0]); $len0 = strlen($d[0]);

View file

@ -17,7 +17,7 @@
optional_variable($groupid); // Group wiki. optional_variable($groupid); // Group wiki.
optional_variable($canceledit,""); // Editing has been cancelled optional_variable($canceledit,""); // Editing has been cancelled
if($canceledit) { if($canceledit) {
$wikipage=$ewiki_id; @$wikipage=$ewiki_id;
} }
if ($id) { if ($id) {