refactor: Improve self-closing tag support in automark.ts

This commit is contained in:
kwaroran
2024-06-10 02:04:29 +09:00
parent b93d1d947f
commit 6fea4118d3

View File

@@ -3,8 +3,10 @@ const excludesDat = ['<','>','{','}','[',']','(',')','-',':',';','…','—','
const selfClosingTags = [
'br','hr','img','input','meta','link','base','area','col','command','embed','keygen','param','source','track','wbr',
//self closing tags defined by HTML5
'!'
'!',
//for doctype <!DOCTYPE html> and comment <!-- -->
'user', 'bot', 'char'
//special tags for user, bot, and char
]
const checkSelfClosingTag = (dat:string) => {