Skip to content

Commit

Permalink
refactor(concealer): rename variables
Browse files Browse the repository at this point in the history
  • Loading branch information
champignoom committed Nov 26, 2023
1 parent 22932b6 commit b265c56
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lua/neorg/modules/core/concealer/module.lua
Original file line number Diff line number Diff line change
Expand Up @@ -408,10 +408,9 @@ local function format_ordered_icon(pattern, index)
return gen(index)
end

for k,v in pairs(ordered_icon_table) do
local l,r = pattern:find(k:find("%w") and "%f[%w]" .. k .. "%f[%W]" or k)
for char_one,number_table in pairs(ordered_icon_table) do
local l,r = pattern:find(char_one:find("%w") and "%f[%w]" .. char_one .. "%f[%W]" or char_one)
if l then
local number_table = ordered_icon_table[k]
gen = function(index_)
local icon = type(number_table)=='function' and number_table(index_) or number_table[index_]
return icon and pattern:sub(1,l-1) .. icon .. pattern:sub(r+1)
Expand Down

0 comments on commit b265c56

Please sign in to comment.