dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
96bdd88
)
experimental fix to the template-inserts-newline-on-save problem
author
Gabriel Wicke
<gwicke@users.mediawiki.org>
Sun, 2 May 2004 23:18:25 +0000
(23:18 +0000)
committer
Gabriel Wicke
<gwicke@users.mediawiki.org>
Sun, 2 May 2004 23:18:25 +0000
(23:18 +0000)
includes/Parser.php
patch
|
blob
|
history
diff --git
a/includes/Parser.php
b/includes/Parser.php
index
1f28f5c
..
cd1469b
100644
(file)
--- a/
includes/Parser.php
+++ b/
includes/Parser.php
@@
-1468,7
+1468,7
@@
class Parser
if ( !$found ) {
return $matches[0];
} else {
- return $
newline . $
text;
+ return $text;
}
}
@@
-1515,7
+1515,7
@@
class Parser
$htmlattrs = $this->getHTMLattrs () ;
# Remove HTML comments
- $text = preg_replace( "/
\n?<!--.*-->\n?/sU", "
", $text );
+ $text = preg_replace( "/
(\n *<!--.*--> *(?=\n)|<!--.*-->)/sU", "$2
", $text );
$bits = explode( "<", $text );
$text = array_shift( $bits );