fix(sidebar): escape square brackets (#591)

This commit is contained in:
Dennis Dillert 2024-09-15 17:06:50 +02:00 committed by GitHub
parent 6604d03237
commit f9520c4fdf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1014,7 +1014,7 @@ local function get_chat_record_prefix(timestamp, provider, model, request)
.. "/" .. "/"
.. model .. model
.. "\n\n> " .. "\n\n> "
.. request:gsub("\n", "\n> ") .. request:gsub("\n", "\n> "):gsub("([%w-_]+)%b[]", "`%0`")
.. "\n\n" .. "\n\n"
end end