mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
Fixed some formatting issues that prevented ** and ## from working.
This commit is contained in:
parent
9c945552fb
commit
24223b9eb7
2 changed files with 12 additions and 12 deletions
|
@ -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]);
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue