HTML: don't treat colons as namespace prefix delimiters in tag names (#7273)
This commit is contained in:
1 parent
c97e96d31e
commit
9900174d50
7 files changed
+551
-21
No files matched your search
@@ -0,0 +1,59 @@
|
||||
#### Don't treat colons as namespace prefix delimiters in tag names ([#7273](https://github.com/prettier/prettier/pull/7273) by [@fisker](https://github.com/fisker))
|
||||
|
||||
In HTML5, colons don't have any special meaning in tag names. Previously, Prettier treated them the XML way, as namespace prefix delimiters, but no more. In practice, this means that tags whose ancestors have colons in their names are now treated as usual HTML tags: if they're known standard tags, their names can be lowercased and assumptions can be made about their whitespace sensitivity; custom elements whose names are unknown to Prettier retain the casing of their names and are treated as inline with `--html-whitespace-sensitivity css`.
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
```html
|
||||
<!-- Input -->
|
||||
<with:colon>
|
||||
<div> looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block </div>
|
||||
<DIV> block </DIV><DIV> block </DIV> <DIV> block </DIV><div> block </div><div> block </div>
|
||||
<pre> pre pr
|
||||
e</pre>
|
||||
<textarea> pre-wrap pr
|
||||
e-wrap </textarea>
|
||||
<span> looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline </span>
|
||||
<span> inline </span><span> inline </span> <span> inline </span><span> inline </span>
|
||||
</with:colon>
|
||||
|
||||
<!-- Prettier stable -->
|
||||
<with:colon>
|
||||
<div>
|
||||
looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block
|
||||
</div>
|
||||
<DIV> block </DIV><DIV> block </DIV> <DIV> block </DIV><div> block </div
|
||||
><div> block </div>
|
||||
<pre> pre pr e</pre>
|
||||
<textarea> pre-wrap pr e-wrap </textarea>
|
||||
<span>
|
||||
looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline
|
||||
</span>
|
||||
<span> inline </span><span> inline </span> <span> inline </span
|
||||
><span> inline </span>
|
||||
</with:colon>
|
||||
|
||||
<!-- Prettier master -->
|
||||
<with:colon>
|
||||
<div>
|
||||
looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block
|
||||
</div>
|
||||
<div>block</div>
|
||||
<div>block</div>
|
||||
<div>block</div>
|
||||
<div>block</div>
|
||||
<div>block</div>
|
||||
<pre>
|
||||
pre pr
|
||||
e</pre
|
||||
>
|
||||
<textarea>
|
||||
pre-wrap pr
|
||||
e-wrap </textarea
|
||||
>
|
||||
<span>
|
||||
looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline
|
||||
</span>
|
||||
<span> inline </span><span> inline </span> <span> inline </span
|
||||
><span> inline </span>
|
||||
</with:colon>
|
||||
```
|
||||
@@ -1,7 +1,11 @@
|
||||
"use strict";
|
||||
|
||||
const parseFrontMatter = require("../utils/front-matter");
|
||||
const { HTML_ELEMENT_ATTRIBUTES, HTML_TAGS } = require("./utils");
|
||||
const {
|
||||
HTML_ELEMENT_ATTRIBUTES,
|
||||
HTML_TAGS,
|
||||
isUnknownNamespace
|
||||
} = require("./utils");
|
||||
const { hasPragma } = require("./pragma");
|
||||
const createError = require("../common/parser-create-error");
|
||||
const { Node } = require("./ast");
|
||||
@@ -112,7 +116,8 @@ function ngHtmlParser(
|
||||
if (
|
||||
normalizeTagName &&
|
||||
(!node.namespace ||
|
||||
node.namespace === node.tagDefinition.implicitNamespacePrefix)
|
||||
node.namespace === node.tagDefinition.implicitNamespacePrefix ||
|
||||
isUnknownNamespace(node))
|
||||
) {
|
||||
node.name = lowerCaseIfFn(
|
||||
node.name,
|
||||
@@ -154,7 +159,8 @@ function ngHtmlParser(
|
||||
);
|
||||
if (
|
||||
!node.namespace ||
|
||||
node.namespace === tagDefinition.implicitNamespacePrefix
|
||||
node.namespace === tagDefinition.implicitNamespacePrefix ||
|
||||
isUnknownNamespace(node)
|
||||
) {
|
||||
node.tagDefinition = tagDefinition;
|
||||
} else {
|
||||
|
||||
@@ -501,17 +501,27 @@ function getNodeCssStyleDisplay(node, options) {
|
||||
default:
|
||||
return (
|
||||
(node.type === "element" &&
|
||||
(!node.namespace || isInSvgForeignObject) &&
|
||||
(!node.namespace ||
|
||||
isInSvgForeignObject ||
|
||||
isUnknownNamespace(node)) &&
|
||||
CSS_DISPLAY_TAGS[node.name]) ||
|
||||
CSS_DISPLAY_DEFAULT
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function isUnknownNamespace(node) {
|
||||
return (
|
||||
node.type === "element" &&
|
||||
!node.hasExplicitNamespace &&
|
||||
!["html", "svg"].includes(node.namespace)
|
||||
);
|
||||
}
|
||||
|
||||
function getNodeCssStyleWhiteSpace(node) {
|
||||
return (
|
||||
(node.type === "element" &&
|
||||
!node.namespace &&
|
||||
(!node.namespace || isUnknownNamespace(node)) &&
|
||||
CSS_WHITE_SPACE_TAGS[node.name]) ||
|
||||
CSS_WHITE_SPACE_DEFAULT
|
||||
);
|
||||
@@ -635,6 +645,7 @@ module.exports = {
|
||||
isTextLikeNode,
|
||||
isTrailingSpaceSensitiveNode,
|
||||
isWhitespaceSensitiveNode,
|
||||
isUnknownNamespace,
|
||||
normalizeParts,
|
||||
preferHardlineAsLeadingSpaces,
|
||||
preferHardlineAsTrailingSpaces,
|
||||
|
||||
@@ -503,3 +503,338 @@ printWidth: 80
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`with-colon.html 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["html"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
<!-- unknown tag with colon -->
|
||||
<div>
|
||||
<foo:bar>
|
||||
<div> looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block </div>
|
||||
<div> block </div><DIV> BLOCK </DIV> <div> block </div><div> block </div><div> block </div>
|
||||
<pre> pre pr
|
||||
e</pre>
|
||||
<textarea> pre-wrap pr
|
||||
e-wrap </textarea>
|
||||
<span> looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline </span>
|
||||
<span> inline </span><span> inline </span> <span> inline </span><span> inline </span>
|
||||
<html:div> looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block </html:div>
|
||||
<html:DIV> block </html:DIV><HTML:DIV> BLOCK </HTML:DIV> <html:div> block </html:div><html:div> block </html:div><html:div> block </html:div>
|
||||
<html:pre> pre pr
|
||||
e</html:pre>
|
||||
<html:textarea> pre-wrap pr
|
||||
e-wrap </html:textarea>
|
||||
<html:span> looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline </html:span>
|
||||
<html:span> inline </html:span><html:span> inline </html:span> <html:span> inline </html:span><html:span> inline </html:span></foo:bar>
|
||||
</div>
|
||||
|
||||
<!-- block tag with colon -->
|
||||
<div>
|
||||
<foo:div>
|
||||
<div> looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block </div>
|
||||
<div> block </div><DIV> BLOCK </DIV> <div> block </div><div> block </div><div> block </div>
|
||||
<pre> pre pr
|
||||
e</pre>
|
||||
<textarea> pre-wrap pr
|
||||
e-wrap </textarea>
|
||||
<span> looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline </span>
|
||||
<span> inline </span><span> inline </span> <span> inline </span><span> inline </span>
|
||||
<html:div> looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block </html:div>
|
||||
<html:DIV> block </html:DIV><HTML:DIV> BLOCK </HTML:DIV> <html:div> block </html:div><html:div> block </html:div><html:div> block </html:div>
|
||||
<html:pre> pre pr
|
||||
e</html:pre>
|
||||
<html:textarea> pre-wrap pr
|
||||
e-wrap </html:textarea>
|
||||
<html:span> looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline </html:span>
|
||||
<html:span> inline </html:span><html:span> inline </html:span> <html:span> inline </html:span><html:span> inline </html:span></foo:div>
|
||||
</div>
|
||||
|
||||
<!-- inline tag with colon -->
|
||||
<div>
|
||||
<foo:span>
|
||||
<div> looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block </div>
|
||||
<div> block </div><DIV> BLOCK </DIV> <div> block </div><div> block </div><div> block </div>
|
||||
<pre> pre pr
|
||||
e</pre>
|
||||
<textarea> pre-wrap pr
|
||||
e-wrap </textarea>
|
||||
<span> looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline </span>
|
||||
<span> inline </span><span> inline </span> <span> inline </span><span> inline </span>
|
||||
<html:div> looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block </html:div>
|
||||
<html:DIV> block </html:DIV><HTML:DIV> BLOCK </HTML:DIV> <html:div> block </html:div><html:div> block </html:div><html:div> block </html:div>
|
||||
<html:pre> pre pr
|
||||
e</html:pre>
|
||||
<html:textarea> pre-wrap pr
|
||||
e-wrap </html:textarea>
|
||||
<html:span> looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline </html:span>
|
||||
<html:span> inline </html:span><html:span> inline </html:span> <html:span> inline </html:span><html:span> inline </html:span></foo:span>
|
||||
</div>
|
||||
|
||||
<!-- unknown -->
|
||||
<div>
|
||||
<foo-bar>
|
||||
<div> looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block </div>
|
||||
<div> block </div><DIV> BLOCK </DIV> <div> block </div><div> block </div><div> block </div>
|
||||
<pre> pre pr
|
||||
e</pre>
|
||||
<textarea> pre-wrap pr
|
||||
e-wrap </textarea>
|
||||
<span> looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline </span>
|
||||
<span> inline </span><span> inline </span> <span> inline </span><span> inline </span>
|
||||
<html:div> looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block </html:div>
|
||||
<html:DIV> block </html:DIV><HTML:DIV> BLOCK </HTML:DIV> <html:div> block </html:div><html:div> block </html:div><html:div> block </html:div>
|
||||
<html:pre> pre pr
|
||||
e</html:pre>
|
||||
<html:textarea> pre-wrap pr
|
||||
e-wrap </html:textarea>
|
||||
<html:span> looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline </html:span>
|
||||
<html:span> inline </html:span><html:span> inline </html:span> <html:span> inline </html:span><html:span> inline </html:span></foo-bar>
|
||||
</div>
|
||||
|
||||
<!-- without colon -->
|
||||
<div>
|
||||
<div>
|
||||
<div> looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block </div>
|
||||
<div> block </div><DIV> BLOCK </DIV> <div> block </div><div> block </div><div> block </div>
|
||||
<pre> pre pr
|
||||
e</pre>
|
||||
<textarea> pre-wrap pr
|
||||
e-wrap </textarea>
|
||||
<span> looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline </span>
|
||||
<span> inline </span><span> inline </span> <span> inline </span><span> inline </span>
|
||||
<html:div> looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block </html:div>
|
||||
<html:DIV> block </html:DIV><HTML:DIV> BLOCK </HTML:DIV> <html:div> block </html:div><html:div> block </html:div><html:div> block </html:div>
|
||||
<html:pre> pre pr
|
||||
e</html:pre>
|
||||
<html:textarea> pre-wrap pr
|
||||
e-wrap </html:textarea>
|
||||
<html:span> looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline </html:span>
|
||||
<html:span> inline </html:span><html:span> inline </html:span> <html:span> inline </html:span><html:span> inline </html:span></div>
|
||||
</div>
|
||||
|
||||
<!-- #7236 -->
|
||||
<with:colon>
|
||||
<div><h1> text text text text text text text text text text text text text text </h1></div>
|
||||
<script>
|
||||
const func = function() { console.log('Hello, there');}
|
||||
</script>
|
||||
</with:colon>
|
||||
|
||||
=====================================output=====================================
|
||||
<!-- unknown tag with colon -->
|
||||
<div>
|
||||
<foo:bar>
|
||||
<div>
|
||||
looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block
|
||||
</div>
|
||||
<div>block</div>
|
||||
<div>BLOCK</div>
|
||||
<div>block</div>
|
||||
<div>block</div>
|
||||
<div>block</div>
|
||||
<pre>
|
||||
pre pr
|
||||
e</pre
|
||||
>
|
||||
<textarea>
|
||||
pre-wrap pr
|
||||
e-wrap </textarea
|
||||
>
|
||||
<span>
|
||||
looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline
|
||||
</span>
|
||||
<span> inline </span><span> inline </span> <span> inline </span
|
||||
><span> inline </span>
|
||||
<html:div>
|
||||
looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block
|
||||
</html:div>
|
||||
<html:DIV> block </html:DIV><HTML:DIV> BLOCK </HTML:DIV>
|
||||
<html:div> block </html:div><html:div> block </html:div
|
||||
><html:div> block </html:div>
|
||||
<html:pre> pre pr e</html:pre>
|
||||
<html:textarea> pre-wrap pr e-wrap </html:textarea>
|
||||
<html:span>
|
||||
looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline
|
||||
</html:span>
|
||||
<html:span> inline </html:span><html:span> inline </html:span>
|
||||
<html:span> inline </html:span><html:span> inline </html:span></foo:bar
|
||||
>
|
||||
</div>
|
||||
|
||||
<!-- block tag with colon -->
|
||||
<div>
|
||||
<foo:div>
|
||||
<div>
|
||||
looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block
|
||||
</div>
|
||||
<div>block</div>
|
||||
<div>BLOCK</div>
|
||||
<div>block</div>
|
||||
<div>block</div>
|
||||
<div>block</div>
|
||||
<pre>
|
||||
pre pr
|
||||
e</pre
|
||||
>
|
||||
<textarea>
|
||||
pre-wrap pr
|
||||
e-wrap </textarea
|
||||
>
|
||||
<span>
|
||||
looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline
|
||||
</span>
|
||||
<span> inline </span><span> inline </span> <span> inline </span
|
||||
><span> inline </span>
|
||||
<html:div>
|
||||
looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block
|
||||
</html:div>
|
||||
<html:DIV> block </html:DIV><HTML:DIV> BLOCK </HTML:DIV>
|
||||
<html:div> block </html:div><html:div> block </html:div
|
||||
><html:div> block </html:div>
|
||||
<html:pre> pre pr e</html:pre>
|
||||
<html:textarea> pre-wrap pr e-wrap </html:textarea>
|
||||
<html:span>
|
||||
looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline
|
||||
</html:span>
|
||||
<html:span> inline </html:span><html:span> inline </html:span>
|
||||
<html:span> inline </html:span><html:span> inline </html:span></foo:div
|
||||
>
|
||||
</div>
|
||||
|
||||
<!-- inline tag with colon -->
|
||||
<div>
|
||||
<foo:span>
|
||||
<div>
|
||||
looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block
|
||||
</div>
|
||||
<div>block</div>
|
||||
<div>BLOCK</div>
|
||||
<div>block</div>
|
||||
<div>block</div>
|
||||
<div>block</div>
|
||||
<pre>
|
||||
pre pr
|
||||
e</pre
|
||||
>
|
||||
<textarea>
|
||||
pre-wrap pr
|
||||
e-wrap </textarea
|
||||
>
|
||||
<span>
|
||||
looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline
|
||||
</span>
|
||||
<span> inline </span><span> inline </span> <span> inline </span
|
||||
><span> inline </span>
|
||||
<html:div>
|
||||
looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block
|
||||
</html:div>
|
||||
<html:DIV> block </html:DIV><HTML:DIV> BLOCK </HTML:DIV>
|
||||
<html:div> block </html:div><html:div> block </html:div
|
||||
><html:div> block </html:div>
|
||||
<html:pre> pre pr e</html:pre>
|
||||
<html:textarea> pre-wrap pr e-wrap </html:textarea>
|
||||
<html:span>
|
||||
looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline
|
||||
</html:span>
|
||||
<html:span> inline </html:span><html:span> inline </html:span>
|
||||
<html:span> inline </html:span><html:span> inline </html:span></foo:span
|
||||
>
|
||||
</div>
|
||||
|
||||
<!-- unknown -->
|
||||
<div>
|
||||
<foo-bar>
|
||||
<div>
|
||||
looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block
|
||||
</div>
|
||||
<div>block</div>
|
||||
<div>BLOCK</div>
|
||||
<div>block</div>
|
||||
<div>block</div>
|
||||
<div>block</div>
|
||||
<pre>
|
||||
pre pr
|
||||
e</pre
|
||||
>
|
||||
<textarea>
|
||||
pre-wrap pr
|
||||
e-wrap </textarea
|
||||
>
|
||||
<span>
|
||||
looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline
|
||||
</span>
|
||||
<span> inline </span><span> inline </span> <span> inline </span
|
||||
><span> inline </span>
|
||||
<html:div>
|
||||
looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block
|
||||
</html:div>
|
||||
<html:DIV> block </html:DIV><HTML:DIV> BLOCK </HTML:DIV>
|
||||
<html:div> block </html:div><html:div> block </html:div
|
||||
><html:div> block </html:div>
|
||||
<html:pre> pre pr e</html:pre>
|
||||
<html:textarea> pre-wrap pr e-wrap </html:textarea>
|
||||
<html:span>
|
||||
looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline
|
||||
</html:span>
|
||||
<html:span> inline </html:span><html:span> inline </html:span>
|
||||
<html:span> inline </html:span><html:span> inline </html:span></foo-bar
|
||||
>
|
||||
</div>
|
||||
|
||||
<!-- without colon -->
|
||||
<div>
|
||||
<div>
|
||||
<div>
|
||||
looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block
|
||||
</div>
|
||||
<div>block</div>
|
||||
<div>BLOCK</div>
|
||||
<div>block</div>
|
||||
<div>block</div>
|
||||
<div>block</div>
|
||||
<pre>
|
||||
pre pr
|
||||
e</pre
|
||||
>
|
||||
<textarea>
|
||||
pre-wrap pr
|
||||
e-wrap </textarea
|
||||
>
|
||||
<span>
|
||||
looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline
|
||||
</span>
|
||||
<span> inline </span><span> inline </span> <span> inline </span
|
||||
><span> inline </span>
|
||||
<html:div>
|
||||
looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block
|
||||
</html:div>
|
||||
<html:DIV> block </html:DIV><HTML:DIV> BLOCK </HTML:DIV>
|
||||
<html:div> block </html:div><html:div> block </html:div
|
||||
><html:div> block </html:div>
|
||||
<html:pre> pre pr e</html:pre>
|
||||
<html:textarea> pre-wrap pr e-wrap </html:textarea>
|
||||
<html:span>
|
||||
looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline
|
||||
</html:span>
|
||||
<html:span> inline </html:span><html:span> inline </html:span>
|
||||
<html:span> inline </html:span><html:span> inline </html:span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- #7236 -->
|
||||
<with:colon>
|
||||
<div>
|
||||
<h1>
|
||||
text text text text text text text text text text text text text text
|
||||
</h1>
|
||||
</div>
|
||||
<script>
|
||||
const func = function() { console.log('Hello, there');}
|
||||
</script>
|
||||
</with:colon>
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
@@ -0,0 +1,112 @@
|
||||
<!-- unknown tag with colon -->
|
||||
<div>
|
||||
<foo:bar>
|
||||
<div> looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block </div>
|
||||
<div> block </div><DIV> BLOCK </DIV> <div> block </div><div> block </div><div> block </div>
|
||||
<pre> pre pr
|
||||
e</pre>
|
||||
<textarea> pre-wrap pr
|
||||
e-wrap </textarea>
|
||||
<span> looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline </span>
|
||||
<span> inline </span><span> inline </span> <span> inline </span><span> inline </span>
|
||||
<html:div> looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block </html:div>
|
||||
<html:DIV> block </html:DIV><HTML:DIV> BLOCK </HTML:DIV> <html:div> block </html:div><html:div> block </html:div><html:div> block </html:div>
|
||||
<html:pre> pre pr
|
||||
e</html:pre>
|
||||
<html:textarea> pre-wrap pr
|
||||
e-wrap </html:textarea>
|
||||
<html:span> looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline </html:span>
|
||||
<html:span> inline </html:span><html:span> inline </html:span> <html:span> inline </html:span><html:span> inline </html:span></foo:bar>
|
||||
</div>
|
||||
|
||||
<!-- block tag with colon -->
|
||||
<div>
|
||||
<foo:div>
|
||||
<div> looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block </div>
|
||||
<div> block </div><DIV> BLOCK </DIV> <div> block </div><div> block </div><div> block </div>
|
||||
<pre> pre pr
|
||||
e</pre>
|
||||
<textarea> pre-wrap pr
|
||||
e-wrap </textarea>
|
||||
<span> looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline </span>
|
||||
<span> inline </span><span> inline </span> <span> inline </span><span> inline </span>
|
||||
<html:div> looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block </html:div>
|
||||
<html:DIV> block </html:DIV><HTML:DIV> BLOCK </HTML:DIV> <html:div> block </html:div><html:div> block </html:div><html:div> block </html:div>
|
||||
<html:pre> pre pr
|
||||
e</html:pre>
|
||||
<html:textarea> pre-wrap pr
|
||||
e-wrap </html:textarea>
|
||||
<html:span> looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline </html:span>
|
||||
<html:span> inline </html:span><html:span> inline </html:span> <html:span> inline </html:span><html:span> inline </html:span></foo:div>
|
||||
</div>
|
||||
|
||||
<!-- inline tag with colon -->
|
||||
<div>
|
||||
<foo:span>
|
||||
<div> looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block </div>
|
||||
<div> block </div><DIV> BLOCK </DIV> <div> block </div><div> block </div><div> block </div>
|
||||
<pre> pre pr
|
||||
e</pre>
|
||||
<textarea> pre-wrap pr
|
||||
e-wrap </textarea>
|
||||
<span> looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline </span>
|
||||
<span> inline </span><span> inline </span> <span> inline </span><span> inline </span>
|
||||
<html:div> looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block </html:div>
|
||||
<html:DIV> block </html:DIV><HTML:DIV> BLOCK </HTML:DIV> <html:div> block </html:div><html:div> block </html:div><html:div> block </html:div>
|
||||
<html:pre> pre pr
|
||||
e</html:pre>
|
||||
<html:textarea> pre-wrap pr
|
||||
e-wrap </html:textarea>
|
||||
<html:span> looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline </html:span>
|
||||
<html:span> inline </html:span><html:span> inline </html:span> <html:span> inline </html:span><html:span> inline </html:span></foo:span>
|
||||
</div>
|
||||
|
||||
<!-- unknown -->
|
||||
<div>
|
||||
<foo-bar>
|
||||
<div> looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block </div>
|
||||
<div> block </div><DIV> BLOCK </DIV> <div> block </div><div> block </div><div> block </div>
|
||||
<pre> pre pr
|
||||
e</pre>
|
||||
<textarea> pre-wrap pr
|
||||
e-wrap </textarea>
|
||||
<span> looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline </span>
|
||||
<span> inline </span><span> inline </span> <span> inline </span><span> inline </span>
|
||||
<html:div> looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block </html:div>
|
||||
<html:DIV> block </html:DIV><HTML:DIV> BLOCK </HTML:DIV> <html:div> block </html:div><html:div> block </html:div><html:div> block </html:div>
|
||||
<html:pre> pre pr
|
||||
e</html:pre>
|
||||
<html:textarea> pre-wrap pr
|
||||
e-wrap </html:textarea>
|
||||
<html:span> looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline </html:span>
|
||||
<html:span> inline </html:span><html:span> inline </html:span> <html:span> inline </html:span><html:span> inline </html:span></foo-bar>
|
||||
</div>
|
||||
|
||||
<!-- without colon -->
|
||||
<div>
|
||||
<div>
|
||||
<div> looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block </div>
|
||||
<div> block </div><DIV> BLOCK </DIV> <div> block </div><div> block </div><div> block </div>
|
||||
<pre> pre pr
|
||||
e</pre>
|
||||
<textarea> pre-wrap pr
|
||||
e-wrap </textarea>
|
||||
<span> looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline </span>
|
||||
<span> inline </span><span> inline </span> <span> inline </span><span> inline </span>
|
||||
<html:div> looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog block </html:div>
|
||||
<html:DIV> block </html:DIV><HTML:DIV> BLOCK </HTML:DIV> <html:div> block </html:div><html:div> block </html:div><html:div> block </html:div>
|
||||
<html:pre> pre pr
|
||||
e</html:pre>
|
||||
<html:textarea> pre-wrap pr
|
||||
e-wrap </html:textarea>
|
||||
<html:span> looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog inline </html:span>
|
||||
<html:span> inline </html:span><html:span> inline </html:span> <html:span> inline </html:span><html:span> inline </html:span></div>
|
||||
</div>
|
||||
|
||||
<!-- #7236 -->
|
||||
<with:colon>
|
||||
<div><h1> text text text text text text text text text text text text text text </h1></div>
|
||||
<script>
|
||||
const func = function() { console.log('Hello, there');}
|
||||
</script>
|
||||
</with:colon>
|
||||
@@ -1887,7 +1887,7 @@ printWidth: 80
|
||||
<router-outlet></router-outlet>
|
||||
<app-footer [input]="something"></app-footer>
|
||||
</div>
|
||||
<x:root><SPAN>foreign tag name should not be lower cased</SPAN></x:root>
|
||||
<x:root><SPAN>tag name in other namespace should also lower cased</SPAN></x:root>
|
||||
<div>
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit,
|
||||
"<strong>seddoeiusmod</strong>".
|
||||
@@ -2071,7 +2071,9 @@ printWidth: 80
|
||||
<router-outlet></router-outlet>
|
||||
<app-footer [input]="something"></app-footer>
|
||||
</div>
|
||||
<x:root><SPAN>foreign tag name should not be lower cased</SPAN></x:root>
|
||||
<x:root
|
||||
><span>tag name in other namespace should also lower cased</span></x:root
|
||||
>
|
||||
<div>
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit,
|
||||
"<strong>seddoeiusmod</strong>".
|
||||
@@ -2196,7 +2198,7 @@ printWidth: 1
|
||||
<router-outlet></router-outlet>
|
||||
<app-footer [input]="something"></app-footer>
|
||||
</div>
|
||||
<x:root><SPAN>foreign tag name should not be lower cased</SPAN></x:root>
|
||||
<x:root><SPAN>tag name in other namespace should also lower cased</SPAN></x:root>
|
||||
<div>
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit,
|
||||
"<strong>seddoeiusmod</strong>".
|
||||
@@ -2549,15 +2551,16 @@ printWidth: 1
|
||||
></app-footer>
|
||||
</div>
|
||||
<x:root
|
||||
><SPAN
|
||||
>foreign
|
||||
tag
|
||||
><span
|
||||
>tag
|
||||
name
|
||||
in
|
||||
other
|
||||
namespace
|
||||
should
|
||||
not
|
||||
be
|
||||
also
|
||||
lower
|
||||
cased</SPAN
|
||||
cased</span
|
||||
></x:root
|
||||
>
|
||||
<div>
|
||||
@@ -2705,7 +2708,7 @@ printWidth: Infinity
|
||||
<router-outlet></router-outlet>
|
||||
<app-footer [input]="something"></app-footer>
|
||||
</div>
|
||||
<x:root><SPAN>foreign tag name should not be lower cased</SPAN></x:root>
|
||||
<x:root><SPAN>tag name in other namespace should also lower cased</SPAN></x:root>
|
||||
<div>
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit,
|
||||
"<strong>seddoeiusmod</strong>".
|
||||
@@ -2826,7 +2829,7 @@ printWidth: Infinity
|
||||
<router-outlet></router-outlet>
|
||||
<app-footer [input]="something"></app-footer>
|
||||
</div>
|
||||
<x:root><SPAN>foreign tag name should not be lower cased</SPAN></x:root>
|
||||
<x:root><span>tag name in other namespace should also lower cased</span></x:root>
|
||||
<div>
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, "<strong>seddoeiusmod</strong>".
|
||||
</div>
|
||||
@@ -2951,7 +2954,7 @@ printWidth: 80
|
||||
<router-outlet></router-outlet>
|
||||
<app-footer [input]="something"></app-footer>
|
||||
</div>
|
||||
<x:root><SPAN>foreign tag name should not be lower cased</SPAN></x:root>
|
||||
<x:root><SPAN>tag name in other namespace should also lower cased</SPAN></x:root>
|
||||
<div>
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit,
|
||||
"<strong>seddoeiusmod</strong>".
|
||||
@@ -3121,7 +3124,9 @@ printWidth: 80
|
||||
<router-outlet></router-outlet>
|
||||
<app-footer [input]="something"></app-footer>
|
||||
</div>
|
||||
<x:root><SPAN>foreign tag name should not be lower cased</SPAN></x:root>
|
||||
<x:root
|
||||
><span>tag name in other namespace should also lower cased</span></x:root
|
||||
>
|
||||
<div>
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit,
|
||||
"<strong>seddoeiusmod</strong>".
|
||||
@@ -3247,7 +3252,7 @@ printWidth: 80
|
||||
<router-outlet></router-outlet>
|
||||
<app-footer [input]="something"></app-footer>
|
||||
</div>
|
||||
<x:root><SPAN>foreign tag name should not be lower cased</SPAN></x:root>
|
||||
<x:root><SPAN>tag name in other namespace should also lower cased</SPAN></x:root>
|
||||
<div>
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit,
|
||||
"<strong>seddoeiusmod</strong>".
|
||||
@@ -3458,7 +3463,9 @@ printWidth: 80
|
||||
<router-outlet></router-outlet>
|
||||
<app-footer [input]="something"></app-footer>
|
||||
</div>
|
||||
<x:root><SPAN>foreign tag name should not be lower cased</SPAN></x:root>
|
||||
<x:root>
|
||||
<span>tag name in other namespace should also lower cased</span>
|
||||
</x:root>
|
||||
<div>
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, "
|
||||
<strong>seddoeiusmod</strong>
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
<router-outlet></router-outlet>
|
||||
<app-footer [input]="something"></app-footer>
|
||||
</div>
|
||||
<x:root><SPAN>foreign tag name should not be lower cased</SPAN></x:root>
|
||||
<x:root><SPAN>tag name in other namespace should also lower cased</SPAN></x:root>
|
||||
<div>
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit,
|
||||
"<strong>seddoeiusmod</strong>".
|
||||
|
||||
Reference in new issue
Block a user