diff options
Diffstat (limited to 'lexers')
| -rw-r--r-- | lexers/LexYAML.cxx | 6 | 
1 files changed, 5 insertions, 1 deletions
| diff --git a/lexers/LexYAML.cxx b/lexers/LexYAML.cxx index 9f28bb843..3709538b7 100644 --- a/lexers/LexYAML.cxx +++ b/lexers/LexYAML.cxx @@ -98,7 +98,7 @@ static void ColouriseYAMLLine(  		}  	}  	styler.SetLineState(currentLine, 0); -	if (strncmp(lineBuffer, "---", 3) == 0) {	// Document marker +	if (strncmp(lineBuffer, "---", 3) == 0 || strncmp(lineBuffer, "...", 3) == 0) {	// Document marker  		styler.SetLineState(currentLine, YAML_STATE_DOCUMENT);  		styler.ColourTo(endPos, SCE_YAML_DOCUMENT);  		return; @@ -119,6 +119,10 @@ static void ColouriseYAMLLine(  	while (i < lengthLine) {  		if (lineBuffer[i] == '\'' || lineBuffer[i] == '\"') {  			bInQuotes = !bInQuotes; +		} else if (lineBuffer[i] == '#' && isspacechar(lineBuffer[i - 1]) && !bInQuotes) { +			styler.ColourTo(startLine + i - 1, SCE_YAML_DEFAULT); +			styler.ColourTo(endPos, SCE_YAML_COMMENT); +			return;  		} else if (lineBuffer[i] == ':' && !bInQuotes) {  			styler.ColourTo(startLine + i - 1, SCE_YAML_IDENTIFIER);  			styler.ColourTo(startLine + i, SCE_YAML_OPERATOR); | 
