diff options
| author | nyamatongwe <unknown> | 2012-04-21 21:02:30 +1000 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2012-04-21 21:02:30 +1000 | 
| commit | b81956f7f599206e547156b9026d88de95f5b2a6 (patch) | |
| tree | 265aa7a932893ff605d59e9869979aef0cdbe05d /lexers/LexHTML.cxx | |
| parent | 659b3cb21411f82056b9d73ebe5a2d4fee3ce5ae (diff) | |
| download | scintilla-mirror-b81956f7f599206e547156b9026d88de95f5b2a6.tar.gz | |
Fix problem where PHP sequence stops backtracking to tag start. Bug #3520027.
Now backtracks by whole lines until not inside tag.
Diffstat (limited to 'lexers/LexHTML.cxx')
| -rw-r--r-- | lexers/LexHTML.cxx | 7 | 
1 files changed, 4 insertions, 3 deletions
| diff --git a/lexers/LexHTML.cxx b/lexers/LexHTML.cxx index 9ebca16f8..7534acc8e 100644 --- a/lexers/LexHTML.cxx +++ b/lexers/LexHTML.cxx @@ -598,11 +598,12 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty  	char djangoBlockType[2];  	djangoBlockType[0] = '\0'; -	// If inside a tag, it may be a script tag, so reread from the start to ensure any language tags are seen +	// If inside a tag, it may be a script tag, so reread from the start of line starting tag to ensure any language tags are seen  	if (InTagState(state)) {  		while ((startPos > 0) && (InTagState(styler.StyleAt(startPos - 1)))) { -			startPos--; -			length++; +			int backLineStart = styler.LineStart(styler.GetLine(startPos-1)); +			length += startPos - backLineStart; +			startPos = backLineStart;  		}  		state = SCE_H_DEFAULT;  	} | 
