refactor: Add support for self-closing tag '!' in automark.ts
This commit is contained in:
@@ -1,6 +1,9 @@
|
|||||||
|
|
||||||
const excludesDat = ['<','>','{','}','[',']','(',')','-',':',';','…','—','–','_','*','+','/','\\','|','!','?','.',',',' ']
|
const excludesDat = ['<','>','{','}','[',']','(',')','-',':',';','…','—','–','_','*','+','/','\\','|','!','?','.',',',' ']
|
||||||
const selfClosingTags = ['br','hr','img','input','meta','link','base','area','col','command','embed','keygen','param','source','track','wbr']
|
const selfClosingTags = [
|
||||||
|
'br','hr','img','input','meta','link','base','area','col','command','embed','keygen','param','source','track','wbr',
|
||||||
|
'!' //for doctype <!DOCTYPE html> and comment <!-- -->
|
||||||
|
]
|
||||||
|
|
||||||
const checkSelfClosingTag = (dat:string) => {
|
const checkSelfClosingTag = (dat:string) => {
|
||||||
for(const tag of selfClosingTags){
|
for(const tag of selfClosingTags){
|
||||||
|
|||||||
Reference in New Issue
Block a user