BlueSpice MediaWiki master
 All Classes Namespaces Files Functions Variables Groups Pages
MediaWiki\Tidy\BalanceActiveFormattingElements Class Reference

Public Member Functions

 insertMarker ()
 
 push (BalanceElement $elt)
 
 clearToMarker ()
 
 findElementByTag ($tag)
 
 isInList (BalanceElement $elt)
 
 remove (BalanceElement $elt)
 
 replace (BalanceElement $a, BalanceElement $b)
 
 insertAfter (BalanceElement $a, BalanceElement $b)
 
 reconstruct ($stack)
 
 __toString ()
 

Detailed Description

The list of active formatting elements, which is used to handle mis-nested formatting element tags in the HTML5 tree builder specification.

Since
1.27
See Also
https://html.spec.whatwg.org/multipage/syntax.html#list-of-active-formatting-elements

Member Function Documentation

MediaWiki\Tidy\BalanceActiveFormattingElements::__toString ( )

Get a string representation of the AFE list, for debugging

MediaWiki\Tidy\BalanceActiveFormattingElements::clearToMarker ( )

Follow the steps required when the spec asks us to "clear the list of active formatting elements up to the last marker".

MediaWiki\Tidy\BalanceActiveFormattingElements::findElementByTag (   $tag)

Find and return the last element with the specified tag between the end of the list and the last marker on the list. Used when parsing <a> "in body mode".

Parameters
string$tag
Returns
null|Node
MediaWiki\Tidy\BalanceActiveFormattingElements::insertAfter ( BalanceElement  $a,
BalanceElement  $b 
)

Find $a in the list and insert $b after it.

Parameters
BalanceElement$a
BalanceElement$b
MediaWiki\Tidy\BalanceActiveFormattingElements::isInList ( BalanceElement  $elt)

Determine whether an element is in the list of formatting elements.

Parameters
BalanceElement$elt
Returns
bool
MediaWiki\Tidy\BalanceActiveFormattingElements::push ( BalanceElement  $elt)

Follow the steps required when the spec requires us to "push onto the list of active formatting elements".

Parameters
BalanceElement$elt
MediaWiki\Tidy\BalanceActiveFormattingElements::reconstruct (   $stack)

Reconstruct the active formatting elements.

Parameters
BalanceStack$stackThe open elements stack
See Also
https://html.spec.whatwg.org/multipage/syntax.html#reconstruct-the-active-formatting-elements
MediaWiki\Tidy\BalanceActiveFormattingElements::remove ( BalanceElement  $elt)

Find the element $elt in the list and remove it. Used when parsing <a> in body mode.

Parameters
BalanceElement$elt
MediaWiki\Tidy\BalanceActiveFormattingElements::replace ( BalanceElement  $a,
BalanceElement  $b 
)

Find element $a in the list and replace it with element $b

Parameters
BalanceElement$a
BalanceElement$b

The documentation for this class was generated from the following file: