Skip to content

Commit

Permalink
hotfix: temporarily revert #1144 because of incorrect merge conflict …
Browse files Browse the repository at this point in the history
…resolution
  • Loading branch information
vhyrro committed Nov 18, 2023
1 parent a923055 commit f3ea48e
Showing 1 changed file with 28 additions and 28 deletions.
56 changes: 28 additions & 28 deletions lua/neorg/modules/core/summary/module.lua
Original file line number Diff line number Diff line change
Expand Up @@ -127,34 +127,34 @@ module.load = function()
})
end

local leaf_categories = categories
local categories_path = vim.split(category, ".", { plain = true })
for i, path in ipairs(categories_path) do
local titled_path = lib.title(path)
if i == #categories_path then
table.insert(leaf_categories[titled_path], {
title = tostring(metadata.title),
norgname = norgname,
description = metadata.description,
})
break
end
local sub_categories = vim.defaulttable()
if leaf_categories[titled_path] then
for _, item in ipairs(leaf_categories[titled_path]) do
if item.sub_categories then
leaf_categories = item.sub_categories
goto continue
end
end
end
table.insert(leaf_categories[titled_path], {
title = titled_path,
sub_categories = sub_categories,
})
leaf_categories = sub_categories
::continue::
end
-- local leaf_categories = categories
-- local categories_path = vim.split(category, ".", { plain = true })
-- for i, path in ipairs(categories_path) do
-- local titled_path = lib.title(path)
-- if i == #categories_path then
-- table.insert(leaf_categories[titled_path], {
-- title = tostring(metadata.title),
-- norgname = norgname,
-- description = metadata.description,
-- })
-- break
-- end
-- local sub_categories = vim.defaulttable()
-- if leaf_categories[titled_path] then
-- for _, item in ipairs(leaf_categories[titled_path]) do
-- if item.sub_categories then
-- leaf_categories = item.sub_categories
-- goto continue
-- end
-- end
-- end
-- table.insert(leaf_categories[titled_path], {
-- title = titled_path,
-- sub_categories = sub_categories,
-- })
-- leaf_categories = sub_categories
-- ::continue::
-- end
end
end)
local result = {}
Expand Down

0 comments on commit f3ea48e

Please sign in to comment.