diff options
| author | nyamatongwe <unknown> | 2005-03-03 00:27:27 +0000 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2005-03-03 00:27:27 +0000 | 
| commit | fd538bb1c91411eb766ae4aeec910c97f911f6ff (patch) | |
| tree | 4267bd263c3046905e206970788b01e8b394f3f6 /src/LexHTML.cxx | |
| parent | 6a5d8ae8963d99dbc8d87e6c59bd2440136fd90f (diff) | |
| download | scintilla-mirror-fd538bb1c91411eb766ae4aeec910c97f911f6ff.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 | 
