File tree Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -33,19 +33,20 @@ def process(doc)
3333 end
3434
3535 diff_blocks = tb . offset_blocks_start - prev_block . offset_blocks_end - 1
36- if diff_blocks <= @max_blocks_distance
37- ok = true
38- ok = false if prev_block . is_not_content? && @content_only
39- ok = false if ok && prev_block . tag_level != tb . tag_level && @same_tag_level_only
40-
41- if ok
42- prev_block . merge_next ( tb )
43- blocks_to_remove << tb
44- else
45- prev_block = tb
46- end
36+ next if diff_blocks > @max_blocks_distance
37+
38+ ok = true
39+ ok = false if prev_block . is_not_content? && @content_only
40+ ok = false if ok && prev_block . tag_level != tb . tag_level && @same_tag_level_only
41+
42+ if ok
43+ prev_block . merge_next ( tb )
44+ blocks_to_remove << tb
45+ else
46+ prev_block = tb
4747 end
4848 end
49+
4950 doc . replace_text_blocks! ( text_blocks - blocks_to_remove )
5051 doc
5152 end
You can’t perform that action at this time.
0 commit comments