mirror of
git://develop.git.wordpress.org/
synced 2025-01-18 05:18:42 +01:00
HTML API: Apply linting changes to @TODO
comments.
Lowercase `@TODO` comments introduced by [57186], and remove spurious colons after them. Props dmsnell, TobiasBg, mukesh27, sergeybiryukov, jonsurrell. Fixes #60060. git-svn-id: https://develop.svn.wordpress.org/trunk@57209 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
1bca32e30e
commit
cafaabfaf4
@ -105,7 +105,7 @@ class WP_HTML_Active_Formatting_Elements {
|
|||||||
* > paired such that the two attributes in each pair have identical names, namespaces, and values
|
* > paired such that the two attributes in each pair have identical names, namespaces, and values
|
||||||
* > (the order of the attributes does not matter).
|
* > (the order of the attributes does not matter).
|
||||||
*
|
*
|
||||||
* @TODO: Implement the "Noah's Ark clause" to only add up to three of any given kind of formatting elements to the stack.
|
* @todo Implement the "Noah's Ark clause" to only add up to three of any given kind of formatting elements to the stack.
|
||||||
*/
|
*/
|
||||||
// > Add element to the list of active formatting elements.
|
// > Add element to the list of active formatting elements.
|
||||||
$this->stack[] = $token;
|
$this->stack[] = $token;
|
||||||
|
@ -252,7 +252,7 @@ class WP_HTML_Processor extends WP_HTML_Tag_Processor {
|
|||||||
$p->state->context_node = array( 'BODY', array() );
|
$p->state->context_node = array( 'BODY', array() );
|
||||||
$p->state->insertion_mode = WP_HTML_Processor_State::INSERTION_MODE_IN_BODY;
|
$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['root-node'] = new WP_HTML_Span( 0, 0 );
|
||||||
$p->bookmarks['context-node'] = new WP_HTML_Span( 0, 0 );
|
$p->bookmarks['context-node'] = new WP_HTML_Span( 0, 0 );
|
||||||
|
|
||||||
@ -506,7 +506,7 @@ class WP_HTML_Processor extends WP_HTML_Tag_Processor {
|
|||||||
* When moving on to the next node, therefore, if the bottom-most element
|
* When moving on to the next node, therefore, if the bottom-most element
|
||||||
* on the stack is a void element, it must be closed.
|
* 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
|
* they must also be implicitly closed here too. BGSOUND is
|
||||||
* special since it's only self-closing if the self-closing flag
|
* special since it's only self-closing if the self-closing flag
|
||||||
* is provided in the opening tag, otherwise it expects a tag closer.
|
* is provided in the opening tag, otherwise it expects a tag closer.
|
||||||
@ -608,7 +608,7 @@ class WP_HTML_Processor extends WP_HTML_Tag_Processor {
|
|||||||
*/
|
*/
|
||||||
case '+BUTTON':
|
case '+BUTTON':
|
||||||
if ( $this->state->stack_of_open_elements->has_element_in_scope( '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->generate_implied_end_tags();
|
||||||
$this->state->stack_of_open_elements->pop_until( 'BUTTON' );
|
$this->state->stack_of_open_elements->pop_until( 'BUTTON' );
|
||||||
}
|
}
|
||||||
@ -685,14 +685,14 @@ class WP_HTML_Processor extends WP_HTML_Tag_Processor {
|
|||||||
case '-SECTION':
|
case '-SECTION':
|
||||||
case '-SUMMARY':
|
case '-SUMMARY':
|
||||||
if ( ! $this->state->stack_of_open_elements->has_element_in_scope( $tag_name ) ) {
|
if ( ! $this->state->stack_of_open_elements->has_element_in_scope( $tag_name ) ) {
|
||||||
// @TODO: Report parse error.
|
// @todo Report parse error.
|
||||||
// Ignore the token.
|
// Ignore the token.
|
||||||
return $this->step();
|
return $this->step();
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->generate_implied_end_tags();
|
$this->generate_implied_end_tags();
|
||||||
if ( $this->state->stack_of_open_elements->current_node()->node_name !== $tag_name ) {
|
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 );
|
$this->state->stack_of_open_elements->pop_until( $tag_name );
|
||||||
return true;
|
return true;
|
||||||
@ -717,7 +717,7 @@ class WP_HTML_Processor extends WP_HTML_Tag_Processor {
|
|||||||
true
|
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();
|
$this->state->stack_of_open_elements->pop();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -737,7 +737,7 @@ class WP_HTML_Processor extends WP_HTML_Tag_Processor {
|
|||||||
/*
|
/*
|
||||||
* This is a parse error; ignore the token.
|
* 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();
|
return $this->step();
|
||||||
}
|
}
|
||||||
@ -745,7 +745,7 @@ class WP_HTML_Processor extends WP_HTML_Tag_Processor {
|
|||||||
$this->generate_implied_end_tags();
|
$this->generate_implied_end_tags();
|
||||||
|
|
||||||
if ( $this->state->stack_of_open_elements->current_node()->node_name !== $tag_name ) {
|
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)' );
|
$this->state->stack_of_open_elements->pop_until( '(internal: H1 through H6 - do not use)' );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user