Skip to content

Commit

Permalink
Fixed some problems affecting wiki ** and ## formatting tags.
Browse files Browse the repository at this point in the history
  • Loading branch information
mchurch committed Sep 2, 2004
1 parent aa3d922 commit 92b5764
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
22 changes: 11 additions & 11 deletions mod/wiki/ewiki/ewiki.php
Expand Up @@ -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
if (isset($wm_list[$c0])) {
Expand Down Expand Up @@ -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
foreach ($wm_start_end as $d) {
$len0 = strlen($d[0]);
Expand Down
2 changes: 1 addition & 1 deletion mod/wiki/view.php
Expand Up @@ -17,7 +17,7 @@
optional_variable($groupid); // Group wiki.
optional_variable($canceledit,""); // Editing has been cancelled
if($canceledit) {
$wikipage=$ewiki_id;
@$wikipage=$ewiki_id;
}

if ($id) {
Expand Down

0 comments on commit 92b5764

Please sign in to comment.