From c2a95d4db64d8749dc2b69c4d93b885d94613e58 Mon Sep 17 00:00:00 2001 From: sam_marshall Date: Fri, 8 Jun 2007 13:45:10 +0000 Subject: [PATCH] MDL-7541 Fixed wiki html diff --- mod/wiki/ewiki/plugins/moodle/diff.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/mod/wiki/ewiki/plugins/moodle/diff.php b/mod/wiki/ewiki/plugins/moodle/diff.php index 1f3388eda0..5a97691c77 100755 --- a/mod/wiki/ewiki/plugins/moodle/diff.php +++ b/mod/wiki/ewiki/plugins/moodle/diff.php @@ -46,15 +46,16 @@ $content0 = preg_replace('/(\S)\s+(\S)/', '$1 $2', $content0); // Remove multiple spaces. $content = preg_replace('/\n|\r/i', ' ', $content); $content = preg_replace('/(\S)\s+(\S)/', '$1 $2', $content); - + /// Replace

 

- $content0 = preg_replace('#(( |\s+)

|

)#i', "\n", $content0); - $content = preg_replace('#(( |\s+)

|

)#i', "\n", $content); + $content0 = preg_replace('#(]*)?>( |\s+)

)|(]*)?>

)#i', "\n", $content0); + $content = preg_replace('#(]*)?>( |\s+)

)|(]*)?>

)#i', "\n", $content); + /// Place new line characters at logical HTML positions. - $htmlendings = array('+()+iU', '+()+iU', '+(

)+i', '+()+iU', '+()+iU', - '+()+i', '+()+iU', '+()+i', '+()+iU', '+()+i', - '+()+i', '+()+iU', '+()+i'); + $htmlendings = array('+()+iU', '+(]*)?>)+iU', '+(

)+i', '+()+iU', '+()+iU', + '+()+i', '+()+iU', '+()+i', '+()+iU', '+()+i', + '+()+i', '+()+iU', '+()+i'); $htmlrepl = array("\n\$1\n", "\n\$1\n", "\n\$1\n", "\n\$1\n", "\n\$1\n", "\n\$1\n", "\n\$1\n", "\n\$1\n", "\n\$1\n", "\n\$1\n", "\n\$1\n", "\n\$1\n", "\n\$1\n"); -- 2.39.5