From 434d1e5426373e142ccdd2b4a46e715f9d84d2ce Mon Sep 17 00:00:00 2001 From: zufuliu Date: Sun, 12 Jan 2025 09:14:10 +0800 Subject: [PATCH] Auto close HTML `

` tag. --- src/EditAutoC.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/EditAutoC.cpp b/src/EditAutoC.cpp index 19ae457136..1ef12c5fbd 100644 --- a/src/EditAutoC.cpp +++ b/src/EditAutoC.cpp @@ -1987,7 +1987,8 @@ void EditAutoCloseXMLTag() noexcept { tchIns[cchIns] = ' '; tchIns[cchIns + 1] = '\0'; - if (cchIns > 2 && (pLexCurrent->iLexer == SCLEX_HTML || pLexCurrent->iLexer == SCLEX_PHPSCRIPT)) { + if (cchIns > 3 && (pLexCurrent->iLexer == SCLEX_HTML || pLexCurrent->iLexer == SCLEX_PHPSCRIPT)) { + // HTML void tag except

if (IsHtmlVoidTag(tchIns + 1)) { autoClosed = true; cchIns = 0;