Skip to content

Commit

Permalink
Add insert_marker method
Browse files Browse the repository at this point in the history
Extracted from WordPress#6982
  • Loading branch information
sirreal committed Jul 17, 2024
1 parent 724dde1 commit e9b724e
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,22 @@ public function current_node() {
return $current_node ? $current_node : null;
}

/**
* Inserts a "marker" at the end of the list of active formatting elements.
*
* > The markers are inserted when entering applet, object, marquee,
* > template, td, th, and caption elements, and are used to prevent
* > formatting from "leaking" into applet, object, marquee, template,
* > td, th, and caption elements.
*
* @see https://html.spec.whatwg.org/#concept-parser-marker
*
* @since 6.7.0
*/
public function insert_marker() {
$this->push( new WP_HTML_Token( null, 'marker', false ) );
}

/**
* Pushes a node onto the stack of active formatting elements.
*
Expand Down

0 comments on commit e9b724e

Please sign in to comment.