Skip to content

Commit 05d6983

Browse files
chore: Use util function for reversing order
1 parent dfcb945 commit 05d6983

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lua/orgmode/files/headline.lua

+1-5
Original file line numberDiff line numberDiff line change
@@ -243,11 +243,7 @@ function Headline:get_outline_path()
243243
end
244244

245245
-- reverse headline order
246-
local outer_to_inner_parent_headlines = {}
247-
for i = #inner_to_outer_parent_headlines, 1, -1 do
248-
table.insert(outer_to_inner_parent_headlines, inner_to_outer_parent_headlines[i])
249-
end
250-
246+
local outer_to_inner_parent_headlines = utils.reverse(inner_to_outer_parent_headlines)
251247
local outline_path = table.concat(outer_to_inner_parent_headlines, '/')
252248
return outline_path
253249
end

0 commit comments

Comments
 (0)