Skip to content

Commit

Permalink
HTML API: Apply linting changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmsnell committed Dec 15, 2023
1 parent f2c78fe commit e6fefef
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/wp-includes/html-api/class-wp-html-processor.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ public static function create_fragment( $html, $context = '<body>', $encoding =
$p->state->context_node = array( 'BODY', array() );
$p->state->insertion_mode = WP_HTML_Processor_State::INSERTION_MODE_IN_BODY;

// @TODO: Create "fake" bookmarks for non-existent but implied nodes.
// @todo: Create "fake" bookmarks for non-existent but implied nodes.
$p->bookmarks['root-node'] = new WP_HTML_Span( 0, 0 );
$p->bookmarks['context-node'] = new WP_HTML_Span( 0, 0 );

Expand Down Expand Up @@ -506,7 +506,7 @@ public function step( $node_to_process = self::PROCESS_NEXT_NODE ) {
* When moving on to the next node, therefore, if the bottom-most element
* on the stack is a void element, it must be closed.
*
* @TODO: Once self-closing foreign elements and BGSOUND are supported,
* @todo: Once self-closing foreign elements and BGSOUND are supported,
* they must also be implicitly closed here too. BGSOUND is
* special since it's only self-closing if the self-closing flag
* is provided in the opening tag, otherwise it expects a tag closer.
Expand Down Expand Up @@ -608,7 +608,7 @@ private function step_in_body() {
*/
case '+BUTTON':
if ( $this->state->stack_of_open_elements->has_element_in_scope( 'BUTTON' ) ) {
// @TODO: Indicate a parse error once it's possible. This error does not impact the logic here.
// @todo: Indicate a parse error once it's possible. This error does not impact the logic here.
$this->generate_implied_end_tags();
$this->state->stack_of_open_elements->pop_until( 'BUTTON' );
}
Expand Down Expand Up @@ -685,14 +685,14 @@ private function step_in_body() {
case '-SECTION':
case '-SUMMARY':
if ( ! $this->state->stack_of_open_elements->has_element_in_scope( $tag_name ) ) {
// @TODO: Report parse error.
// @todo: Report parse error.
// Ignore the token.
return $this->step();
}

$this->generate_implied_end_tags();
if ( $this->state->stack_of_open_elements->current_node()->node_name !== $tag_name ) {
// @TODO: Record parse error: this error doesn't impact parsing.
// @todo: Record parse error: this error doesn't impact parsing.
}
$this->state->stack_of_open_elements->pop_until( $tag_name );
return true;
Expand All @@ -717,7 +717,7 @@ private function step_in_body() {
true
)
) {
// @TODO: Indicate a parse error once it's possible.
// @todo: Indicate a parse error once it's possible.
$this->state->stack_of_open_elements->pop();
}

Expand All @@ -737,15 +737,15 @@ private function step_in_body() {
/*
* This is a parse error; ignore the token.
*
* @TODO: Indicate a parse error once it's possible.
* @todo: Indicate a parse error once it's possible.
*/
return $this->step();
}

$this->generate_implied_end_tags();

if ( $this->state->stack_of_open_elements->current_node()->node_name !== $tag_name ) {
// @TODO: Record parse error: this error doesn't impact parsing.
// @todo: Record parse error: this error doesn't impact parsing.
}

$this->state->stack_of_open_elements->pop_until( '(internal: H1 through H6 - do not use)' );
Expand Down

0 comments on commit e6fefef

Please sign in to comment.