Index: trunk/phase3/includes/parser/Parser.php |
— | — | @@ -327,6 +327,12 @@ |
328 | 328 | $text = $this->internalParse( $text ); |
329 | 329 | $text = $this->mStripState->unstripGeneral( $text ); |
330 | 330 | |
| 331 | + # To make wikitext easier to read where significant |
| 332 | + # whitespace is a problem, '__\' will be eaten up along with |
| 333 | + # all whitespace and newlines that follow it, up to the next |
| 334 | + # non-whitespace character. (Compare 'dnl' from m4.) |
| 335 | + $text = preg_replace('/__\\\\\s*/', '', $text); |
| 336 | + |
331 | 337 | # Clean up special characters, only run once, next-to-last before doBlockLevels |
332 | 338 | $fixtags = array( |
333 | 339 | # french spaces, last one Guillemet-left |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -31,6 +31,9 @@ |
32 | 32 | passing "uploadmsg" parameter in the url |
33 | 33 | * (bug 9947) Add PROTECTIONLEVEL parser funtion to return the protection level |
34 | 34 | for the current page for a given action |
| 35 | +* Added "__\" magic word to eat up all whitespace and newlines to the next |
| 36 | + non-whitespace character, to facilitate writing readable template code where |
| 37 | + whitespace is significant. |
35 | 38 | |
36 | 39 | === Bug fixes in 1.15 === |
37 | 40 | * Fixing the caching issue by using -{T|xxx}- syntax (only applies on wiki with LanguageConverter class) |