Skip to content

Commit

Permalink
fix: make format tags with - in them work properly
Browse files Browse the repository at this point in the history
  • Loading branch information
TorchedSammy committed Mar 13, 2022
1 parent 3e9f178 commit 5a59d0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions init.lua
Expand Up @@ -52,7 +52,7 @@ init('brightMagenta', {95, 39})
init('brightCyan', {96, 39})
init('brightWhite', {97, 39})

-- Bright background
-- Bright background
init('brightBlackBg', {100, 49})
init('brightRedBg', {101, 49})
init('brightGreenBg', {102, 49})
Expand Down Expand Up @@ -100,7 +100,7 @@ Lunacolors.format = function(text)
}

for k, v in pairs(colors) do
text = text:gsub(v[1], v[2])
text = text:gsub(v[1]:gsub('-', '%-'), v[2])
end

return text .. colors['reset'][2]
Expand Down

0 comments on commit 5a59d0f

Please sign in to comment.