mirror of
https://github.com/thelounge/thelounge
synced 2024-11-11 07:04:18 +00:00
Support nested colours
This commit is contained in:
parent
3fc80efd7c
commit
3d5e070c56
1 changed files with 4 additions and 2 deletions
|
@ -60,10 +60,12 @@ function colors(text) {
|
|||
return text;
|
||||
}
|
||||
if (regex.color.test(text)) {
|
||||
var match;
|
||||
var match, bg;
|
||||
while (match = regex.color.exec(text)) {
|
||||
var color = "color-" + match[1];
|
||||
var bg = match[2];
|
||||
if (match[2]) {
|
||||
bg = match[2];
|
||||
}
|
||||
if (bg) {
|
||||
color += " bg-" + bg;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue