Support nested colours
This commit is contained in:
parent
3fc80efd7c
commit
3d5e070c56
@ -60,10 +60,12 @@ function colors(text) {
|
|||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
if (regex.color.test(text)) {
|
if (regex.color.test(text)) {
|
||||||
var match;
|
var match, bg;
|
||||||
while (match = regex.color.exec(text)) {
|
while (match = regex.color.exec(text)) {
|
||||||
var color = "color-" + match[1];
|
var color = "color-" + match[1];
|
||||||
var bg = match[2];
|
if (match[2]) {
|
||||||
|
bg = match[2];
|
||||||
|
}
|
||||||
if (bg) {
|
if (bg) {
|
||||||
color += " bg-" + bg;
|
color += " bg-" + bg;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user