mirror of
https://github.com/StarCitizenTools/mediawiki-extensions-TabberNeue.git
synced 2024-11-23 16:06:45 +00:00
fix: properly wrap text in paragraph if it is a wikitext link
Seems to be related to #151
This commit is contained in:
parent
5b5b97c5f7
commit
dc1d16c276
|
@ -165,11 +165,11 @@ class Tabber {
|
|||
}
|
||||
|
||||
if ( !self::$useCodex ) {
|
||||
$wikitextListMarkers = [ '*', '#', ';', ':' ];
|
||||
$isWikitextList = in_array( substr( $content, 0, 1 ), $wikitextListMarkers );
|
||||
if ( $isWikitextList ) {
|
||||
// Fix #151, some wikitext magic
|
||||
// Seems like there is no way to get rid of the mw-empty-elt paragraphs sadly
|
||||
// Insert a new line for these characters in wikitext (#151)
|
||||
// Seems like there is no way to get rid of the mw-empty-elt paragraphs sadly
|
||||
$wikitextCharacters = [ '*', '#', ';', ':', '[' ];
|
||||
$needsNewLine = in_array( substr( $content, 0, 1 ), $wikitextCharacters );
|
||||
if ( $needsNewLine ) {
|
||||
$content = "\n$content\n";
|
||||
}
|
||||
return $parser->recursiveTagParse( $content, $frame );
|
||||
|
|
Loading…
Reference in a new issue