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

@@ -508,7 +508,7 @@ $\textcolor{#228B22}{F=ma}$ `\textcolor{#228B22}{F=ma}`<br>
$\colorbox{aqua}{A}$ `\colorbox{aqua}{A}`<br>
$\fcolorbox{red}{aqua}{A}$ `\fcolorbox{red}{aqua}{A}`
For color definition, KaTeX color functions will accept the standard HTML [predefined color names](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#Color_keywords). They will also accept an RGB argument in CSS hexa­decimal style.
For color definition, KaTeX color functions will accept the standard HTML [predefined color names](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#Color_keywords). They will also accept an RGB argument in CSS hexa­decimal style. The "#" is optional before a six-digit specification.
**Font**