Skip to content

Commit

Permalink
fix(papis-storage): remove newline/carrage return chars when importing
Browse files Browse the repository at this point in the history
  • Loading branch information
jghauser committed Jun 14, 2024
1 parent 0447b3b commit 31304b0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/papis/papis-storage.lua
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ function M.get_data_full(metadata)

-- ensure that everything is of the correct type
if type_of_val == "text" then
data[key] = tostring(entry[key])
-- convert value to string and remove newline characters
data[key] = string.gsub(tostring(entry[key]), "[\n\r]", "")
elseif type_of_val == "luatable" then
if type(entry[key]) == "table" then
data[key] = entry[key]
Expand Down

0 comments on commit 31304b0

Please sign in to comment.