]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed some formatting issues that prevented ** and ## from working.
authormchurch <mchurch>
Thu, 2 Sep 2004 18:43:23 +0000 (18:43 +0000)
committermchurch <mchurch>
Thu, 2 Sep 2004 18:43:23 +0000 (18:43 +0000)
mod/wiki/ewiki/ewiki.php
mod/wiki/view.php

index 178604fb95ee93f5b6a00e5b420f4c8dd2bddc12..3645c2eed5890cd36d72791e91900566ea0768a2 100644 (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
             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
             foreach ($wm_start_end as $d) {
                $len0 = strlen($d[0]);
index 8c08d029f18c6f829c866605f0a627a5f981205a..ae8407fbddf716a98ea00b7f976f0db6880efcc1 100644 (file)
@@ -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) {