(no commit message)
authorFran Rogers <krimpet@users.mediawiki.org>
Mon, 12 Jan 2009 07:45:34 +0000 (07:45 +0000)
committerFran Rogers <krimpet@users.mediawiki.org>
Mon, 12 Jan 2009 07:45:34 +0000 (07:45 +0000)
RELEASE-NOTES
includes/parser/Parser.php

index 8622878..74ee446 100644 (file)
@@ -31,6 +31,9 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   passing "uploadmsg" parameter in the url
 * (bug 9947) Add PROTECTIONLEVEL parser funtion to return the protection level
   for the current page for a given action
+* Added "__\" magic word to eat up all whitespace and newlines to the next 
+  non-whitespace character, to facilitate writing readable template code where
+  whitespace is significant.
   
 === Bug fixes in 1.15 ===
 * Fixing the caching issue by using -{T|xxx}- syntax (only applies on wiki with LanguageConverter class)
index 07d449e..504660a 100644 (file)
@@ -327,6 +327,12 @@ class Parser
                $text = $this->internalParse( $text );
                $text = $this->mStripState->unstripGeneral( $text );
 
+               # To make wikitext easier to read where significant 
+               # whitespace is a problem, '__\' will be eaten up along with 
+               # all whitespace and newlines that follow it, up to the next 
+               # non-whitespace character. (Compare 'dnl' from m4.)
+               $text = preg_replace('/__\\\\\s*/', '', $text);
+
                # Clean up special characters, only run once, next-to-last before doBlockLevels
                $fixtags = array(
                        # french spaces, last one Guillemet-left