refactor: Improve self-closing tag support in automark.ts
This commit is contained in:
@@ -3,8 +3,10 @@ const excludesDat = ['<','>','{','}','[',']','(',')','-',':',';','…','—','
|
|||||||
const selfClosingTags = [
|
const selfClosingTags = [
|
||||||
'br','hr','img','input','meta','link','base','area','col','command','embed','keygen','param','source','track','wbr',
|
'br','hr','img','input','meta','link','base','area','col','command','embed','keygen','param','source','track','wbr',
|
||||||
//self closing tags defined by HTML5
|
//self closing tags defined by HTML5
|
||||||
'!'
|
'!',
|
||||||
//for doctype <!DOCTYPE html> and comment <!-- -->
|
//for doctype <!DOCTYPE html> and comment <!-- -->
|
||||||
|
'user', 'bot', 'char'
|
||||||
|
//special tags for user, bot, and char
|
||||||
]
|
]
|
||||||
|
|
||||||
const checkSelfClosingTag = (dat:string) => {
|
const checkSelfClosingTag = (dat:string) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user