Wikitext: added horizontal rule support
authorDan
Wed, 26 Aug 2009 13:05:17 -0400
changeset 1106 01315acbc22b
parent 1105 0e46639fd408
child 1107 2d37a11fabd8
Wikitext: added horizontal rule support
includes/wikiengine/parse_mediawiki.php
includes/wikiengine/render_xhtml.php
includes/wikiformat.php
--- a/includes/wikiengine/parse_mediawiki.php	Wed Aug 26 13:04:55 2009 -0400
+++ b/includes/wikiengine/parse_mediawiki.php	Wed Aug 26 13:05:17 2009 -0400
@@ -18,7 +18,8 @@
     'italic' => "/''(.+?)''/",
     'underline' => '/__(.+?)__/',
     'externalwithtext' => '#\[((?:https?|irc|ftp)://.+?) (.+?)\]#',
-    'externalnotext' => '#\[((?:https?|irc|ftp)://.+?)\]#'
+    'externalnotext' => '#\[((?:https?|irc|ftp)://.+?)\]#',
+    'hr' => '/^[-]{4,} *$/m'
   );
   
   private $blockquote_rand_id;
--- a/includes/wikiengine/render_xhtml.php	Wed Aug 26 13:04:55 2009 -0400
+++ b/includes/wikiengine/render_xhtml.php	Wed Aug 26 13:05:17 2009 -0400
@@ -20,7 +20,8 @@
     'italic' => '<em>\\1</em>',
     'underline' => '<span style="text-decoration: underline;">\\1</span>',
     'externalwithtext' => '<a href="\\1" onclick="window.open(this.href); return false;">\\2</a>',
-    'externalnotext' => '<a href="\\1" onclick="window.open(this.href); return false;">\\1</a>'
+    'externalnotext' => '<a href="\\1" onclick="window.open(this.href); return false;">\\1</a>',
+    'hr' => '<hr />'
   );
   
   public function heading($text, $pieces)
--- a/includes/wikiformat.php	Wed Aug 26 13:04:55 2009 -0400
+++ b/includes/wikiformat.php	Wed Aug 26 13:05:17 2009 -0400
@@ -62,6 +62,7 @@
       'blockquote',
       'tables',
       'heading',
+      'hr',
       // note: can't be named list ("list" is a PHP language construct)
       'multilist',
       'bold',