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:
0f037a8
)
(bug 2021)(bug 1937) Move dash replacement to a later stage, so that all links are...
author
Jens Frank
<jeluf@users.mediawiki.org>
Tue, 3 May 2005 04:49:58 +0000
(
04:49
+0000)
committer
Jens Frank
<jeluf@users.mediawiki.org>
Tue, 3 May 2005 04:49:58 +0000
(
04:49
+0000)
includes/Parser.php
patch
|
blob
|
history
diff --git
a/includes/Parser.php
b/includes/Parser.php
index
8027b0a
..
f286cd6
100644
(file)
--- a/
includes/Parser.php
+++ b/
includes/Parser.php
@@
-184,13
+184,6
@@
class Parser
$text = $this->internalParse( $text );
$text = $this->internalParse( $text );
- $dashReplace = array(
- '/ - /' => " – ", # N dash
- '/(?<=[0-9])-(?=[0-9])/' => "–", # N dash between numbers
- '/ -- /' => " — " # M dash
- );
- $text = preg_replace( array_keys($dashReplace), array_values($dashReplace), $text );
-
$text = $this->unstrip( $text, $this->mStripState );
$text = $this->unstrip( $text, $this->mStripState );
@@
-213,6
+206,13
@@
class Parser
$this->replaceLinkHolders( $text );
$this->replaceLinkHolders( $text );
+ $dashReplace = array(
+ '/ - /' => " – ", # N dash
+ '/(?<=[0-9])-(?=[0-9])/' => "–", # N dash between numbers
+ '/ -- /' => " — " # M dash
+ );
+ $text = preg_replace( array_keys($dashReplace), array_values($dashReplace), $text );
+
# the position of the convert() call should not be changed. it
# assumes that the links are all replaces and the only thing left
# is the <nowiki> mark.
# the position of the convert() call should not be changed. it
# assumes that the links are all replaces and the only thing left
# is the <nowiki> mark.