diff options
| -rw-r--r-- | xmake/core/base/colors.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xmake/core/base/colors.lua b/xmake/core/base/colors.lua index 589288f16..4beddd073 100644 --- a/xmake/core/base/colors.lua +++ b/xmake/core/base/colors.lua @@ -341,11 +341,11 @@ function colors.translate(str) else table.insert(blocks, block) end - elseif block:startswith("color.") then - local default_colors = {["bright color.error"] = {"bright", "red"}, ["bright color.warning"] = {"bright", "yellow"}} - local theme_block = default_colors[block] + elseif block:startswith("color.") or block:startswith("text.") then + local default_theme = {["color.error"] = "red", ["color.warning"] = "yellow", ["text.error"] = "error", ["text.warning"] = "warning"} + local theme_block = default_theme[block] if theme_block then - table.join2(blocks, theme_block) + table.insert(blocks, theme_block) else table.insert(blocks, block) end |
