Update of /cvsroot/phpwiki/phpwiki/lib
In directory usw-pr-cvs1:/tmp/cvs-serv18908/lib
Modified Files:
stdlib.php
Log Message:
ConvertOldMarkup(): Wups. I broke footnote conversion. Now I think
it is working again.
Index: stdlib.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/stdlib.php,v
retrieving revision 1.129
retrieving revision 1.130
diff -u -2 -b -p -d -r1.129 -r1.130
--- stdlib.php 19 Oct 2002 20:56:19 -0000 1.129
+++ stdlib.php 19 Oct 2002 21:04:58 -0000 1.130
@@ -713,8 +713,8 @@ function ConvertOldMarkup ($text, $marku
elseif ($block[0] == '[') {
// Footnote definition
- preg_match('/^\[\s*(\d+)/', $block, $m);
+ preg_match('/^\[\s*(\d+)\s*\]/', $block, $m);
$footnum = $m[1];
$block = substr($block, strlen($m[0]));
- $prefix = "#[|ftnt_$footnum]~[[\\1|#ftnt_ref_$footnum]~] ";
+ $prefix = "#[|ftnt_${footnum}]~[[${footnum}|#ftnt_ref_${footnum}]~] ";
}
elseif ($block[0] == '<') {
@@ -742,22 +742,4 @@ function ConvertOldMarkup ($text, $marku
return $out . preg_replace($orig, $repl, $text);
}
-}
-
-
-function _ConvertOldListMarkup ($ind, $bullet) {
- $indent = str_repeat(' ', strlen($ind));
- if ($bullet[0] == ';') {
- //$term = ltrim(substr($bullet, 1));
- //return $indent . $term . "\n" . $indent . ' ';
- return $ind . $bullet;
- }
- else
- return $indent . $bullet . ' ';
-}
-
-function _EscapeNestledMarkup ($line) {
- if (!preg_match('/^<\?plugin.*\?>/', $line))
- $line = preg_replace('/[=_]|(?<!^|[*#;])\*/', '~\\0', $line);
- return $line;
}
|