Skip to content

Commit 73ce0fa

Browse files
committed
reorder boolean checks
1 parent c919203 commit 73ce0fa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/boilerpipe/filters/block_proximity_fusion.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ def process(doc)
3636
next if diff_blocks > @max_blocks_distance
3737

3838
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
39+
ok = false if @content_only && prev_block.is_not_content?
40+
ok = false if ok && @same_tag_level_only && prev_block.tag_level != tb.tag_level
4141

4242
if ok
4343
prev_block.merge_next(tb)

0 commit comments

Comments
 (0)