mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-05 19:28:39 +00:00
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:
@@ -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}");
|
||||
});
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user