-
Notifications
You must be signed in to change notification settings - Fork 3.5k
HTML API: General documentation fixes #12043
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 39 commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
e2ca83d
HTML API: Fix grammar in WP_HTML_Active_Formatting_Elements::count() …
sirreal 10fa6c9
HTML API: Fix grammar in WP_HTML_Open_Elements::count() docblock.
sirreal cedb241
HTML API: Add missing comma in WP_HTML_Processor class docblock.
sirreal 40af083
HTML API: Add missing comma in WP_HTML_Processor::get_last_error() do…
sirreal ef2f483
HTML API: Fix punctuation in WP_HTML_Processor::expects_closer() docb…
sirreal 4db0be7
HTML API: Fix punctuation in serialize_token() docblock.
sirreal e292a93
HTML API: Fix capitalization of "HTML" in WP_HTML_Tag_Processor docbl…
sirreal 91414a6
HTML API: Remove extra word in WP_HTML_Tag_Processor docblock.
sirreal 1ce6d3f
HTML API: Fix typo "do no exist" in WP_HTML_Tag_Processor docblock.
sirreal abfbfa0
HTML API: Remove duplicate word in QUIRKS_MODE description.
sirreal 7a14a38
HTML API: Fix typo "closing to tag" in WP_HTML_Tag_Processor.
sirreal 50cd2f2
HTML API: Fix subject-verb agreement in replacement sorting comment.
sirreal 3d93924
HTML API: Fix verb tense in funky comments docblock.
sirreal b1e6c4a
Tests: HTML API: Fix typo "case-insentivity" in test_next_tag_lowerca…
sirreal 98baee0
Tests: HTML API: Fix typo "unpected" in serialize assertion.
sirreal 685c767
Tests: HTML API: Fix typo "Deprectated" in breadcrumbs test.
sirreal 220bef0
Tests: HTML API: Fix typo "instriction" in comment test data.
sirreal e0a0e97
Tests: HTML API: Fix grammar "Verifies what when" to "Verifies that w…
sirreal 41f520b
Tests: HTML API: Fix typo "BLOCKQOUTE" in list element tests.
sirreal ceebce8
Tests: HTML API: Fix typo "Compete document" in bookmark test data.
sirreal 96d81fe
Tests: HTML API: Fix typo "subesequent" in remove_class assertion mes…
sirreal 5a35fcf
Tests: HTML API: Fix grammar "why modifying" to "when modifying".
sirreal 8b6b3e9
docs: fix src/wp-includes/html-api/class-wp-html-attribute-token.php
sirreal bc2ac1b
docs: fix src/wp-includes/html-api/class-wp-html-decoder.php
sirreal 2861d93
docs: fix src/wp-includes/html-api/class-wp-html-doctype-info.php
sirreal d749176
docs: fix src/wp-includes/html-api/class-wp-html-open-elements.php
sirreal e10db88
docs: fix src/wp-includes/html-api/class-wp-html-processor.php
sirreal cbd9b41
docs: fix src/wp-includes/html-api/class-wp-html-tag-processor.php
sirreal 7ffb517
docs: fix src/wp-includes/html-api/class-wp-html-token.php
sirreal 3b7debd
docs: fix tests/phpunit/tests/html-api/wpHtmlProcessorHtml5lib.php
sirreal e65f38b
docs: fix tests/phpunit/tests/html-api/wpHtmlTagProcessor.php
sirreal 9d9494b
Merge branch 'html-api/docs-review-fix' into html-api/docs-fixes
sirreal f3cab0d
Fix carriage return and line feed symbols
sirreal 251ace2
Correct array|Generator type
sirreal af2c0dc
Use preferred get_updated_html() method in docs
sirreal 9f9939c
Merge branch 'trunk' into html-api/docs-fixes
sirreal 93fe077
Merge branch 'trunk' into html-api/docs-fixes
sirreal b5a7592
Merge branch 'trunk' into html-api/docs-fixes
sirreal bc98388
Merge branch 'trunk' into html-api/docs-fixes
sirreal 00014ea
Use detailed Generator type annotation
sirreal 944ebc3
Merge branch 'trunk' into html-api/docs-fixes
sirreal c1cc035
Improve document mode description and correctness
sirreal d3c7b82
remove redundant doctype compat mode language
sirreal 4588a38
Remove some comma additions
sirreal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -66,7 +66,7 @@ | |
| * tags may be found with the shortest-matching breadcrumb query. That is, | ||
| * `array( 'IMG' )` matches all IMG elements and `array( 'P', 'IMG' )` | ||
| * matches all IMG elements directly inside a P element. To ensure that no | ||
| * partial matches erroneously match it's possible to specify in a query | ||
| * partial matches erroneously match, it's possible to specify in a query | ||
| * the full breadcrumb match all the way down from the root HTML element. | ||
| * | ||
| * Example: | ||
|
|
@@ -341,6 +341,8 @@ public static function create_fragment( $html, $context = '<body>', $encoding = | |
| * isn't UTF-8, first convert the document to UTF-8, then pass in the | ||
| * converted HTML. | ||
| * | ||
| * @since 6.7.0 | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| * | ||
| * @param string $html Input HTML document to process. | ||
| * @param string|null $known_definite_encoding Optional. If provided, specifies the charset used | ||
| * in the input byte stream. Currently must be UTF-8. | ||
|
|
@@ -621,7 +623,7 @@ private function bail( string $message ) { | |
| * | ||
| * Various situations lead to parsing failure but this class will | ||
| * return `false` in all those cases. To determine why something | ||
| * failed it's possible to request the last error. This can be | ||
| * failed, it's possible to request the last error. This can be | ||
|
sirreal marked this conversation as resolved.
Outdated
|
||
| * helpful to know to distinguish whether a given tag couldn't | ||
| * be found or if content in the document caused the processor | ||
| * to give up and abort processing. | ||
|
|
@@ -957,7 +959,7 @@ public function matches_breadcrumbs( $breadcrumbs ): bool { | |
| * token, or if it will self-close on the next step. | ||
| * | ||
| * Most HTML elements expect a closer, such as a P element or | ||
| * a DIV element. Others, like an IMG element are void and don't | ||
| * a DIV element. Others, like an IMG element, are void and don't | ||
| * have a closing tag. Special elements, such as SCRIPT and STYLE, | ||
| * are treated just like void tags. Text nodes and self-closing | ||
| * foreign content will also act just like a void tag, immediately | ||
|
|
@@ -1340,7 +1342,7 @@ public function serialize(): ?string { | |
| * Serializes the currently-matched token. | ||
| * | ||
| * This method produces a fully-normative HTML string for the currently-matched token, | ||
| * if able. If not matched at any token or if the token doesn't correspond to any HTML | ||
| * if able. If not matched at any token, or if the token doesn't correspond to any HTML, | ||
| * it will return an empty string (for example, presumptuous end tags are ignored). | ||
| * | ||
| * @see static::serialize() | ||
|
|
@@ -5208,7 +5210,7 @@ private function step_in_foreign_content(): bool { | |
| * | ||
| * @throws Exception When unable to allocate requested bookmark. | ||
| * | ||
| * @return string|false Name of created bookmark, or false if unable to create. | ||
| * @return string Name of created bookmark. | ||
| */ | ||
| private function bookmark_token() { | ||
| if ( ! parent::set_bookmark( ++$this->bookmark_counter ) ) { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.