Skip to content

Commit

Permalink
[Auto Close Tag] Handle HTML void tag for all scheme except XML.
Browse files Browse the repository at this point in the history
  • Loading branch information
zufuliu committed Jan 12, 2025
1 parent 434d1e5 commit f8689de
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Edit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6461,7 +6461,7 @@ static INT_PTR CALLBACK EditInsertTagDlgProc(HWND hwnd, UINT umsg, WPARAM wParam
if (*pwCur == L'>' && pwCur[-1] != L'/') {
wchIns[cchIns] = L' ';
wchIns[cchIns + 1] = L'\0';
if (cchIns > 3 && cchIns < 16 && (pLexCurrent->iLexer == SCLEX_HTML || pLexCurrent->iLexer == SCLEX_PHPSCRIPT)) {
if (cchIns > 3 && cchIns < 16 && (pLexCurrent->iLexer != SCLEX_XML)) {
char tag[16]; // HTML void tag except <p>
#if NP2_USE_SSE2
const __m128i *mm = reinterpret_cast<const __m128i *>(wchIns);
Expand Down
2 changes: 1 addition & 1 deletion src/EditAutoC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1987,7 +1987,7 @@ void EditAutoCloseXMLTag() noexcept {
tchIns[cchIns] = ' ';
tchIns[cchIns + 1] = '\0';

if (cchIns > 3 && (pLexCurrent->iLexer == SCLEX_HTML || pLexCurrent->iLexer == SCLEX_PHPSCRIPT)) {
if (cchIns > 3 && (pLexCurrent->iLexer != SCLEX_XML)) {
// HTML void tag except <p>
if (IsHtmlVoidTag(tchIns + 1)) {
autoClosed = true;
Expand Down

0 comments on commit f8689de

Please sign in to comment.