BUG#206: replace <!--LINK tags by the link text for displaying text in TOCs
Thanks to Daniel D�sentrieb for his help writing the regexp.
This commit is contained in:
parent
5edddf8238
commit
3d4d040658
1 changed files with 5 additions and 0 deletions
|
|
@ -1959,6 +1959,11 @@ class Parser
|
|||
$canonized_headline = $this->unstrip( $headline, $this->mStripState );
|
||||
$canonized_headline = $this->unstripNoWiki( $headline, $this->mStripState );
|
||||
|
||||
# Remove link placeholders by the link text.
|
||||
# <!--LINK namespace page_title link text with suffix-->
|
||||
# turns into
|
||||
# link text with suffix
|
||||
$canonized_headline = preg_replace( '/<!--LINK [0-9]* [^ ]* *(.*?)-->/','$1', $canonized_headline );
|
||||
# strip out HTML
|
||||
$canonized_headline = preg_replace( '/<.*?' . '>/','',$canonized_headline );
|
||||
$tocline = trim( $canonized_headline );
|
||||
|
|
|
|||
Loading…
Reference in a new issue