Skip to content

Commit

Permalink
fix: check for escaped keys and handle them correctly (#23)
Browse files Browse the repository at this point in the history
Original author is @vE5li. The commit was resigned in order to be
merged upstream.
  • Loading branch information
vE5li authored Sep 19, 2023
1 parent 875636e commit 45577b6
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lua/libmodal/collections/ParseTable.lua
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,22 @@ local function get(parse_table, lhs_reversed_bytes)
return parse_table
end

local out = k

if type(k) == "string" then
for index = 1, #k do
local character = k:byte(index)

if index == 1 then
out = character
else
table.insert(lhs_reversed_bytes, 1, character)
end
end
end

k = out

--[[ Parse the `k`. ]]

-- make sure the dicitonary has a key for that value.
Expand Down

0 comments on commit 45577b6

Please sign in to comment.