Skip to content

Commit

Permalink
fix(util): replace <lt> by < before parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Apr 16, 2023
1 parent 4bd6dca commit 789ac71
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/which-key/util.lua
Expand Up @@ -59,6 +59,7 @@ local Tokens = {
function M.parse_keys(keystr)
local keys = M.t(keystr)
local internal = M.parse_internal(keys)
keystr = keystr:gsub("<lt>", "<")
local notation = {}
---@alias ParseState
--- | "Character"
Expand Down Expand Up @@ -93,7 +94,7 @@ function M.parse_keys(keystr)
notation[1] = internal[1] == mapleader and "<leader>" or notation[1]

if #notation ~= #internal then
error(vim.inspect({ internal = internal, notation = notation }))
error(vim.inspect({ keystr = keystr, internal = internal, notation = notation }))
end

return {
Expand Down

0 comments on commit 789ac71

Please sign in to comment.