diff options
| author | nyamatongwe <unknown> | 2011-06-21 08:13:20 +1000 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2011-06-21 08:13:20 +1000 | 
| commit | 348bce2c59fd0da8d19e9e6e65fb846ea5e54948 (patch) | |
| tree | e4f16f0bae321b9b6c7b7ff2976140c1679fc360 | |
| parent | 475492ef416ff310d14a94a600aa97e7d4f6e7fb (diff) | |
| download | scintilla-mirror-348bce2c59fd0da8d19e9e6e65fb846ea5e54948.tar.gz | |
Support mako ## comments. Bug #3318818.
From Stephan R.A. Deibel.
| -rw-r--r-- | lexers/LexHTML.cxx | 13 | 
1 files changed, 13 insertions, 0 deletions
| diff --git a/lexers/LexHTML.cxx b/lexers/LexHTML.cxx index 4c50a15a1..de057d345 100644 --- a/lexers/LexHTML.cxx +++ b/lexers/LexHTML.cxx @@ -588,6 +588,7 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty  	int state = stateForPrintState(StateToPrint);  	char makoBlockType[200];  	makoBlockType[0] = '\0'; +	int makoComment = 0;  	char djangoBlockType[2];  	djangoBlockType[0] = '\0'; @@ -818,6 +819,18 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty  			lineStartVisibleChars = 0;  		} +		// handle start of Mako comment line +		if (isMako && ch == '#' && chNext == '#') { +			makoComment = 1; +		} +		 +		// handle end of Mako comment line +		else if (isMako && makoComment && (ch == '\r' || ch == '\n')) { +			makoComment = 0; +			styler.ColourTo(i, SCE_HP_COMMENTLINE); +			state = SCE_HP_DEFAULT; +		} +		  		// Allow falling through to mako handling code if newline is going to end a block  		if (((ch == '\r' && chNext != '\n') || (ch == '\n')) &&  			(!isMako || (0 != strcmp(makoBlockType, "%")))) { | 
