diff options
Diffstat (limited to 'src/LexCSS.cxx')
| -rw-r--r-- | src/LexCSS.cxx | 7 | 
1 files changed, 5 insertions, 2 deletions
| diff --git a/src/LexCSS.cxx b/src/LexCSS.cxx index 3b139cdcd..25f974e63 100644 --- a/src/LexCSS.cxx +++ b/src/LexCSS.cxx @@ -62,6 +62,7 @@ static void ColouriseCssDoc(unsigned int startPos, int length, int initStyle, Wo  	int lastState = -1; // before operator  	int lastStateC = -1; // before comment +	int lastStateS = -1; // before single-quoted/double-quoted string  	int op = ' '; // last operator  	int opPrev = ' '; // last operator @@ -105,7 +106,7 @@ static void ColouriseCssDoc(unsigned int startPos, int length, int initStyle, Wo  				i--;  			if ((sc.currentPos - i) % 2 == 1)  				continue; -			sc.ForwardSetState(SCE_CSS_VALUE); +			sc.ForwardSetState(lastStateS);  		}  		if (sc.state == SCE_CSS_OPERATOR) { @@ -280,7 +281,9 @@ static void ColouriseCssDoc(unsigned int startPos, int length, int initStyle, Wo  			lastStateC = sc.state;  			sc.SetState(SCE_CSS_COMMENT);  			sc.Forward(); -		} else if (sc.state == SCE_CSS_VALUE && (sc.ch == '\"' || sc.ch == '\'')) { +		} else if ((sc.state == SCE_CSS_VALUE || sc.state == SCE_CSS_ATTRIBUTE) +			&& (sc.ch == '\"' || sc.ch == '\'')) { +			lastStateS = sc.state;  			sc.SetState((sc.ch == '\"' ? SCE_CSS_DOUBLESTRING : SCE_CSS_SINGLESTRING));  		} else if (IsCssOperator(sc.ch)  			&& (sc.state != SCE_CSS_ATTRIBUTE || sc.ch == ']') | 
