Skip to content

Commit

Permalink
fix(format): double percentage '%' for nvim components (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
linrongbin16 authored Nov 7, 2023
1 parent af46da3 commit b304f51
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lua/lsp-progress/defaults.lua
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,13 @@ local Defaults = {
local has_title = false
local has_message = false
if type(title) == "string" and string.len(title) > 0 then
table.insert(builder, title)
local escaped_title = title:gsub("%%", "%%%%")
table.insert(builder, escaped_title)
has_title = true
end
if type(message) == "string" and string.len(message) > 0 then
table.insert(builder, message)
local escaped_message = message:gsub("%%", "%%%%")
table.insert(builder, escaped_message)
has_message = true
end
if percentage and (has_title or has_message) then
Expand Down

0 comments on commit b304f51

Please sign in to comment.