fix bug 963205 : text starting with space & ! or ? or : will be <pre>ed instead of...
authorAntoine Musso <hashar@users.mediawiki.org>
Sun, 30 May 2004 18:36:33 +0000 (18:36 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Sun, 30 May 2004 18:36:33 +0000 (18:36 +0000)
includes/Parser.php

index ebddd60..f0f9897 100644 (file)
@@ -106,7 +106,8 @@ class Parser
                if(!$wgUseTidy) {
                        $fixtags = array(
                                # french spaces, last one Guillemet-left
-                               "/ (\\?|:|!|\\302\\273)/i"=>"&nbsp;\\1", 
+                               # only if there is something before the space
+                               "/(.) (\\?|:|!|\\302\\273)/i"=>"\\1&nbsp;\\2", 
                                # french spaces, Guillemet-right
                                "/(\\302\\253) /i"=>"\\1&nbsp;", 
                                "/<hr *>/i" => '<hr/>',