WP_HTML_Active_Formatting_Elements::clear_up_to_last_marker()

In this article

Clears the list of active formatting elements up to the last marker.

Description

When the steps below require the UA to clear the list of active formatting elements up to the last marker, the UA must perform the following steps:

  1. Let entry be the last (most recently added) entry in the list of active formatting elements.
  2. Remove entry from the list of active formatting elements.
  3. If entry was a marker, then stop the algorithm at this point.
    The list has been cleared up to the last marker.
  4. Go to step 1.

See also

Source

public function clear_up_to_last_marker(): void {
	foreach ( $this->walk_up() as $item ) {
		array_pop( $this->stack );
		if ( 'marker' === $item->node_name ) {
			break;
		}
	}
}

Changelog

VersionDescription
6.7.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.