Allow 6-digit color spec w/o # (#1690)

* Allow 6-digit color spec w/o #

* Improve RegEx pattern

* Pick up comment

* fix lint
This commit is contained in:
Ron Kok
2018-09-01 10:27:17 -07:00
committed by Kevin Barabash
parent d3ec100d02
commit 9b7e10e4f7
4 changed files with 18 additions and 7 deletions

View File

@@ -296,10 +296,10 @@ describe("Lexer:", function() {
});
describe("#_innerLexColor", function() {
it("reject hex notation without #", function() {
expect`\textcolor{1a2b3c}{foo}`.toFailWithParseError(
"Invalid color: '1a2b3c'" +
" at position 12: \\textcolor{1̲a̲2̲b̲3̲c̲}{foo}");
it("reject 3-digit hex notation without #", function() {
expect`\textcolor{1a2}{foo}`.toFailWithParseError(
"Invalid color: '1a2'" +
" at position 12: \\textcolor{1̲a̲2̲}{foo}");
});
});