Skip to content

Commit 343ca42

Browse files
committed
tidyup
1 parent fd9cb7f commit 343ca42

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lua/neorg/modules/core/summary/module.lua

+2-4
Original file line numberDiff line numberDiff line change
@@ -212,15 +212,13 @@ module.on_event = function(event)
212212
-- find * replace an existing ranged tag
213213
local node_line_below = ts.get_first_node_on_line(buffer, start_line)
214214
if node_line_below and node_line_below:type() == "_paragraph_break" then
215-
-- allow for a line break between heading and tag
216-
node_line_below = ts.get_first_node_on_line(buffer, start_line+1)
215+
-- allow for a line break between heading and tag. Go down one more line.
216+
node_line_below = ts.get_first_node_on_line(buffer, start_line+1)
217217
end
218218
if node_line_below and node_line_below:type() == "ranged_tag" then
219219
start_line, _ = node_line_below:start()
220220
end_line, _ = node_line_below:end_()
221221
end_line = end_line + 1
222-
else
223-
neorg.utils.notify(node_line_below:type())
224222
end
225223

226224
vim.api.nvim_buf_set_lines(buffer, start_line, end_line, true, generated)

0 commit comments

Comments
 (0)