Skip to content

Commit

Permalink
chore: Use util function for reversing order
Browse files Browse the repository at this point in the history
  • Loading branch information
kristijanhusak committed Oct 17, 2024
1 parent dfcb945 commit 05d6983
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lua/orgmode/files/headline.lua
Original file line number Diff line number Diff line change
Expand Up @@ -243,11 +243,7 @@ function Headline:get_outline_path()
end

-- reverse headline order
local outer_to_inner_parent_headlines = {}
for i = #inner_to_outer_parent_headlines, 1, -1 do
table.insert(outer_to_inner_parent_headlines, inner_to_outer_parent_headlines[i])
end

local outer_to_inner_parent_headlines = utils.reverse(inner_to_outer_parent_headlines)
local outline_path = table.concat(outer_to_inner_parent_headlines, '/')
return outline_path
end
Expand Down

0 comments on commit 05d6983

Please sign in to comment.