diff options
author | nyamatongwe <devnull@localhost> | 2005-03-03 00:27:27 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2005-03-03 00:27:27 +0000 |
commit | 4243bbd56842dbd788198f8e323347258da3c174 (patch) | |
tree | 4267bd263c3046905e206970788b01e8b394f3f6 /src/LexHTML.cxx | |
parent | b7c76e809dc2b27dce2a25068acbd9e40f52f6c1 (diff) | |
download | scintilla-mirror-4243bbd56842dbd788198f8e323347258da3c174.tar.gz |
Fix from Iago Rubio to make the text <!--> start a comment but not end it.
Diffstat (limited to 'src/LexHTML.cxx')
-rw-r--r-- | src/LexHTML.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/LexHTML.cxx b/src/LexHTML.cxx index 0b16da2b0..e1406234c 100644 --- a/src/LexHTML.cxx +++ b/src/LexHTML.cxx @@ -719,17 +719,18 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty ///////////////////////////////////// // handle the start of SGML language (DTD) else if (((scriptLanguage == eScriptNone) || (scriptLanguage == eScriptXML)) && - (chPrev == '<') && - (ch == '!') && - (StateToPrint != SCE_H_CDATA) && + (chPrev == '<') && + (ch == '!') && + (StateToPrint != SCE_H_CDATA) && (!IsCommentState(StateToPrint)) && (!IsScriptCommentState(StateToPrint)) ) { beforePreProc = state; styler.ColourTo(i - 2, StateToPrint); if ((chNext == '-') && (chNext2 == '-')) { state = SCE_H_COMMENT; // wait for a pending command - } - else if (isWordCdata(i + 1, i + 7, styler)) { + styler.ColourTo(i + 2, SCE_H_COMMENT); + i += 2; // follow styling after the -- + } else if (isWordCdata(i + 1, i + 7, styler)) { state = SCE_H_CDATA; } else { styler.ColourTo(i, SCE_H_SGML_DEFAULT); // <! is default |