summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--utils/markdown.php13
1 files changed, 10 insertions, 3 deletions
diff --git a/utils/markdown.php b/utils/markdown.php
index dd6416b..89a85b2 100644
--- a/utils/markdown.php
+++ b/utils/markdown.php
@@ -2449,9 +2449,16 @@ class MarkdownExtra_Parser extends Markdown_Parser {
$is_p = !preg_match('/^B\x1A[0-9]+B|^C\x1A[0-9]+C$/', $value);
if ($is_p) {
- $value = "<div class=\"paragraph\">" . $value . "</div>";
- //$value = "<p>" . $value . "</p>";
- //$value = "<div>$value</div>";
+ $centerl = "";
+ $centerr = "";
+ if(strlen($value) > 2 && $value[0] == '=' &&
+ $value[strlen($value)-1] == '=') {
+ $centerl = "<div style=\"text-align: center;\">";
+ $centerr = "</div>";
+ $value = substr($value, 1, strlen($value) - 2);
+ }
+ $value = "<div class=\"paragraph\">" .
+ $centerl . $value . $centerr . "</div>";
}
$grafs[$key] = $value;
}