Skip to content

Commit 044bcfd

Browse files
authored
docs(receipts): fix escaped '%' (#120)
1 parent 182126f commit 044bcfd

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,17 +101,15 @@ require("lsp-progress").setup({
101101
local has_title = false
102102
local has_message = false
103103
if type(title) == "string" and string.len(title) > 0 then
104-
local escaped_title = title:gsub("%%", "%%%%")
105-
table.insert(builder, escaped_title)
104+
table.insert(builder, title)
106105
has_title = true
107106
end
108107
if type(message) == "string" and string.len(message) > 0 then
109-
local escaped_message = message:gsub("%%", "%%%%")
110-
table.insert(builder, escaped_message)
108+
table.insert(builder, message)
111109
has_message = true
112110
end
113111
if percentage and (has_title or has_message) then
114-
table.insert(builder, string.format("(%.0f%%%%)", percentage))
112+
table.insert(builder, string.format("(%.0f%%)", percentage))
115113
end
116114
return { msg = table.concat(builder, " "), done = done }
117115
end,

0 commit comments

Comments
 (0)