mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-24 06:54:00 +00:00
Serialize reference tags by themselves on a line
Bug: T242513 Change-Id: I0744eb27e357e63667da86347d3653f063789fca
This commit is contained in:
parent
ddbca68066
commit
cff011ff0a
|
@ -602,6 +602,16 @@ class References extends ExtensionTag {
|
|||
}
|
||||
}
|
||||
|
||||
/** @inheritDoc */
|
||||
public function after( DOMElement $node, DOMNode $otherNode, SerializerState $state ) {
|
||||
// Serialize new references tags on a new line.
|
||||
if ( WTUtils::isNewElt( $node ) && !DOMUtils::isBody( $otherNode ) ) {
|
||||
return [ 'min' => 1, 'max' => 2 ];
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/** @inheritDoc */
|
||||
public function lintHandler(
|
||||
ParsoidExtensionAPI $extApi, DOMElement $refs, callable $defaultHandler
|
||||
|
|
Loading…
Reference in a new issue