* Failing test

* Allow numbers in el name tests

* Allow numbers in el names
This commit is contained in:
James Bradley
2026-04-01 12:00:00 +08:00
committed by GitHub
parent 64ee0350d7
commit bfaff6b0e1
4 changed files with 9 additions and 9 deletions

View File

@@ -8,7 +8,7 @@ import {
} from './types';
let _id = 1;
const symbolAndNumberRegex = RegExp('[^a-z]');
const symbolAndNumberRegex = RegExp('[^a-z1-6]');
function genId(): number {
return _id++;

View File

@@ -45,7 +45,8 @@ exports[`[html file]: basic.html 1`] = `
<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0\\" />
<meta http-equiv=\\"X-UA-Compatible\\" content=\\"ie=edge\\" />
<title>Document</title>
</head><body></body></html>"
</head><body>
<h1>Title</h1></body></html>"
`;
exports[`[html file]: block-element.html 1`] = `
@@ -184,8 +185,8 @@ exports[`[html file]: invalid-tagname.html 1`] = `
<body>
<div>Hello</div>
<div>Hello</div>
<div>Hello</div>
<div></div></body></html>"
<div></div>
</body></html>"
`;
exports[`[html file]: picture.html 1`] = `
@@ -222,7 +223,7 @@ exports[`[html file]: with-relative-res.html 1`] = `
<body>
<a href=\\"http://localhost:3030/basic.html\\"></a>
<div>Hello</div>
<div>Hello</div>
<alt34>Hello</alt34>
<div>Hello</div>
<div></div>
<img src=\\"http://localhost:3030/a.jpg\\" alt=\\"\\" srcset=\\"\\" />

View File

@@ -9,7 +9,7 @@
</head>
<body>
<h1>Title</h1>
</body>
</html>
</html>

View File

@@ -8,8 +8,7 @@
</head>
<body>
<alt="">Hello</alt="">
<alt34>Hello</alt34>
<d123-_+!@#$%^&*()>Hello</d123-_+!@#$%^&*()>
<ale#></ale#>
</body>
</html>
</html>