diff --git a/.gitignore b/.gitignore index 16af6110..6e85e877 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,4 @@ config.rb /config.inc.php /usr/uploads/ +/usr/*.db diff --git a/tools/transfer-array.php b/tools/transfer-array.php new file mode 100644 index 00000000..57c386e7 --- /dev/null +++ b/tools/transfer-array.php @@ -0,0 +1,13 @@ +'], ['<', '>'], $text); + $text = str_replace(array('<', '>'), array('<', '>'), $text); // footnote $text = preg_replace_callback("/\[\^((?:[^\]]|\\]|\\[)+?)\]/", function ($matches) { @@ -412,7 +410,7 @@ class HyperDown || strlen($matches[1]) > $space; } - $this->startBlock('code', $key, [$matches[1], $matches[3], $isAfterList]); + $this->startBlock('code', $key, array($matches[1], $matches[3], $isAfterList)); } continue; @@ -473,7 +471,7 @@ class HyperDown // footnote case preg_match("/^\[\^((?:[^\]]|\\]|\\[)+?)\]:/", $line, $matches): $space = strlen($matches[0]) - 1; - $this->startBlock('footnote', $key, [$space, $matches[1]]); + $this->startBlock('footnote', $key, array($space, $matches[1])); break; // definition @@ -533,7 +531,7 @@ class HyperDown $aligns[] = $align; } - $this->setBlock($key, [$head, $aligns]); + $this->setBlock($key, array($head, $aligns)); } break; @@ -1010,7 +1008,7 @@ class HyperDown */ private function escapeBracket($str) { - return str_replace(['\[', '\]', '\(', '\)'], ['[', ']', '(', ')'], $str); + return str_replace(array('\[', '\]', '\(', '\)'), array('[', ']', '(', ')'), $str); } /**