Report from: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/5581 . Also apply to latest SciTE.
Code folding gets confused upon seeing block comments (/** … */) in embedded JavaScript.
Code for test:
<div>
<script>
/**
*/
</script>
</div>
<p></p>
When we set fold.hypertext.comment=1 then using /** as opennig block comment will break folding. For above example it happend to block comment and also for script and div tags. If we start comment only with /* (or add space /* *) folding works fine.
https://sourceforge.net/p/scintilla/code/ci/default/tree/lexers/LexHTML.cxx#l642
It is checking only for SCE_HJ_COMMENT, not for SCE_HJ_COMMENTDOC which this is due to the "/**".
This can be fixed by updating line 1236 of LexHTML.cxx.
Diff:
Committed fix with https://github.com/ScintillaOrg/lexilla/commit/0bd13d84b3fef7a72553ab95c43d0d4c9677f70f .