mirror of
https://github.com/danbulant/node-html-parser
synced 2026-06-19 22:51:29 +00:00
change kMarkupPattern to allow more custom element names per spec
This commit is contained in:
parent
b963e9bca9
commit
165ee2d880
1 changed files with 2 additions and 1 deletions
|
|
@ -550,7 +550,8 @@ export class Matcher {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const kMarkupPattern = /<!--[^]*?(?=-->)-->|<(\/?)([a-z][a-z0-9]*-?[a-z0-9]*)\s*([^>]*?)(\/?)>/ig;
|
// https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name
|
||||||
|
const kMarkupPattern = /<!--[^]*?(?=-->)-->|<(\/?)([a-z][-.0-9_a-z]*)\s*([^>]*?)(\/?)>/ig;
|
||||||
const kAttributePattern = /(^|\s)(id|class)\s*=\s*("([^"]+)"|'([^']+)'|(\S+))/ig;
|
const kAttributePattern = /(^|\s)(id|class)\s*=\s*("([^"]+)"|'([^']+)'|(\S+))/ig;
|
||||||
const kSelfClosingElements = {
|
const kSelfClosingElements = {
|
||||||
meta: true,
|
meta: true,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue