File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -16,16 +16,12 @@ function M.out(node)
1616 -- node below the comment
1717 -- Note: For some reason, this isn't required locally (macos _or_ Makefile ubuntu,
1818 -- but does fail on CI. TODO figure out the differences)
19- -- Try multiple times to escape comment nodes on CI
20- local max_attempts = 3
21- local attempts = 0
22- while (nodes .is_comment_node (node ) or nodes .is_augment_target (node )) and attempts < max_attempts do
23- local next_node = M .down (node , nodes .get_srow (node ))
24- if not next_node or next_node == node then
25- break -- Can't move down further, stop trying
19+ -- On CI, comment nodes behave differently - work from parent instead
20+ if nodes .is_comment_node (node ) or nodes .is_augment_target (node ) then
21+ local parent = node :parent ()
22+ if parent then
23+ node = parent
2624 end
27- node = next_node
28- attempts = attempts + 1
2925 end
3026
3127 local candidate = strategies .get_first_ancestor_with_diff_scol (node )
You can’t perform that action at this time.
0 commit comments