summaryrefslogtreecommitdiffstatshomepage
path: root/phpcs.xml.dist
diff options
context:
space:
mode:
authorDennis Snell <dmsnell@git.wordpress.org>2024-08-23 14:53:59 +0000
committerDennis Snell <dmsnell@git.wordpress.org>2024-08-23 14:53:59 +0000
commit1139a51e9c6608dc235938d9d234ed185c5d5706 (patch)
tree1ed687b421a5e5416e5ed3a009162da78a29f97c /phpcs.xml.dist
parentb515d2223a24cba7990dfeda31fbf2d2e8f62ceb (diff)
downloadwordpress-1139a51e9c6608dc235938d9d234ed185c5d5706.tar.gz
wordpress-1139a51e9c6608dc235938d9d234ed185c5d5706.zip
HTML API: Parse DOCTYPE tokens and set HTML parser mode accordingly.
This patch adds until-now missing code to parse the structure of HTML DOCTYPE declarations. The DOCTYPE is mostly unused but can dictate the document compatability mode, which governs whether CSS class names match in a ASCII-case-insensitive way or not, and whether TABLE elements close an open P element. The DOCTYPE information is made available through a new method on the Tag Processor, `get_doctype_info()`. Developed in https://github.com/wordpress/wordpress-develop/pull/7195 Discussed in https://core.trac.wordpress.org/ticket/61576 Props dmsnell, jonsurrell. See #61576. git-svn-id: https://develop.svn.wordpress.org/trunk@58925 602fd350-edb4-49c9-b593-d223f7449a82
Diffstat (limited to 'phpcs.xml.dist')
-rw-r--r--phpcs.xml.dist1
1 files changed, 1 insertions, 0 deletions
diff --git a/phpcs.xml.dist b/phpcs.xml.dist
index ece1c82386..636580a404 100644
--- a/phpcs.xml.dist
+++ b/phpcs.xml.dist
@@ -262,6 +262,7 @@
in the parsing, and distance the code from its standard. -->
<rule ref="Generic.PHP.DiscourageGoto.Found">
<exclude-pattern>/wp-includes/html-api/class-wp-html-processor\.php</exclude-pattern>
+ <exclude-pattern>/wp-includes/html-api/class-wp-html-doctype-info\.php</exclude-pattern>
</rule>
<!-- Exclude sample config from modernization to prevent breaking CI workflows based on WP-CLI scaffold.