Skip to content

Commit

Permalink
Merge pull request #73 from jghauser/fix-telescope-for-real
Browse files Browse the repository at this point in the history
fix(papis-storage): remove all control chars from strings
  • Loading branch information
jghauser committed Jun 17, 2024
2 parents 5bc50d0 + 1c70a15 commit 6955db0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doc/papis.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*papis.txt* For NVIM v0.8.0 Last change: 2024 June 16
*papis.txt* For NVIM v0.8.0 Last change: 2024 June 17

==============================================================================
Table of Contents *papis-table-of-contents*
Expand Down
4 changes: 2 additions & 2 deletions lua/papis/papis-storage.lua
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ function M.get_data_full(metadata)

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

0 comments on commit 6955db0

Please sign in to comment.