Skip to content

Commit

Permalink
Auto close HTML <p> tag.
Browse files Browse the repository at this point in the history
  • Loading branch information
zufuliu committed Jan 12, 2025
1 parent 3c2a0c9 commit 434d1e5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/EditAutoC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <p>
if (IsHtmlVoidTag(tchIns + 1)) {
autoClosed = true;
cchIns = 0;
Expand Down

0 comments on commit 434d1e5

Please sign in to comment.