move fixtag replacement before doBlockLevels to avoid div inside pre
This commit is contained in:
parent
90a58a55d2
commit
c23cb2c9c2
1 changed files with 3 additions and 3 deletions
|
|
@ -91,10 +91,8 @@ class Parser
|
|||
$stripState = NULL;
|
||||
$text = $this->strip( $text, $this->mStripState );
|
||||
$text = $this->internalParse( $text, $linestart );
|
||||
# only once and next-to-last
|
||||
$text = $this->unstrip( $text, $this->mStripState );
|
||||
$text = $this->doBlockLevels( $text, $linestart );
|
||||
# Clean up special characters, only run once and last
|
||||
# Clean up special characters, only run once, next-to-last before doBlockLevels
|
||||
$fixtags = array(
|
||||
"/<hr *>/i" => '<hr/>',
|
||||
"/<br *>/i" => '<br/>',
|
||||
|
|
@ -104,6 +102,8 @@ class Parser
|
|||
# more careful about named entities.
|
||||
'/&(?!:amp;|#[Xx][0-9A-fa-f]+;|#[0-9]+;|[a-zA-Z0-9]+;)/' => '&'
|
||||
);
|
||||
# only once and last
|
||||
$text = $this->doBlockLevels( $text, $linestart );
|
||||
$text = preg_replace( array_keys($fixtags), array_values($fixtags), $text );
|
||||
|
||||
$this->mOutput->setText( $text );
|
||||
|
|
|
|||
Loading…
Reference in a new issue