Fix forgotten colors in SyntaxHighlighter, tests still need updating
This commit is contained in:
parent
7403357b71
commit
a7f30688fe
|
@ -38,7 +38,7 @@ void Highlighter::process() {
|
||||||
newtoken.type = nonmatching;
|
newtoken.type = nonmatching;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
newtoken.color = colormap.find(newtoken.type)->second; // get the appropriate color
|
newtoken.color = colormap[newtoken.type]; // get the appropriate color
|
||||||
m_tokens.push_back(newtoken);
|
m_tokens.push_back(newtoken);
|
||||||
} catch (XMLLexer::NoMoreTokens &err) {
|
} catch (XMLLexer::NoMoreTokens &err) {
|
||||||
break; // We reached the end of the file
|
break; // We reached the end of the file
|
||||||
|
@ -47,6 +47,7 @@ void Highlighter::process() {
|
||||||
newtoken.content = m_lexer->peek();
|
newtoken.content = m_lexer->peek();
|
||||||
m_lexer->skip(1);
|
m_lexer->skip(1);
|
||||||
newtoken.type = nonmatching;
|
newtoken.type = nonmatching;
|
||||||
|
newtoken.color = colormap[nonmatching];
|
||||||
m_tokens.push_back(newtoken);
|
m_tokens.push_back(newtoken);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -81,7 +82,7 @@ void Highlighter::process() {
|
||||||
newtoken.type = nonmatching;
|
newtoken.type = nonmatching;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
newtoken.color = colormap.find(newtoken.type)->second;
|
newtoken.color = colormap[newtoken.type];
|
||||||
m_tokens.push_back(newtoken);
|
m_tokens.push_back(newtoken);
|
||||||
} catch (AttributeLexer::NoMoreTokens &err) {
|
} catch (AttributeLexer::NoMoreTokens &err) {
|
||||||
break;
|
break;
|
||||||
|
@ -90,6 +91,7 @@ void Highlighter::process() {
|
||||||
newtoken.content = attributelexer.peek();
|
newtoken.content = attributelexer.peek();
|
||||||
attributelexer.skip(1);
|
attributelexer.skip(1);
|
||||||
newtoken.type = nonmatching;
|
newtoken.type = nonmatching;
|
||||||
|
newtoken.color = colormap[nonmatching];
|
||||||
m_tokens.push_back(newtoken);
|
m_tokens.push_back(newtoken);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue