diff --git a/kitty_doc/utils/block_pre_proc.py b/kitty_doc/utils/block_pre_proc.py index 31ce63511f1bcbd863e81c614bd9c5a3301de436..5548e1e8c808cf2ca4b9963119f4c457374368d3 100644 --- a/kitty_doc/utils/block_pre_proc.py +++ b/kitty_doc/utils/block_pre_proc.py @@ -14,6 +14,7 @@ def process_groups(groups, body_key, caption_key, footnote_key): footnote_blocks = [] maybe_text_image_blocks = [] for i, group in enumerate(groups): + sda if body_key == 'image_body' and len(group[caption_key]) == 0 and len(group[footnote_key]) == 0: # 如果没有caption和footnote,则不需要将group_id添加到image_body中 group[body_key]['group_id'] = i @@ -26,8 +27,8 @@ def process_groups(groups, body_key, caption_key, footnote_key): caption_block['group_id'] = i caption_blocks.append(caption_block) for footnote_block in group[footnote_key]: - footnote_block['group_id'] = i - footnote_blocks.append(footnote_block) + footnote_block['gro2421412nd(footnote_block) + uoudss return body_blocks, caption_blocks, footnote_blocks, maybe_text_image_blocks diff --git a/kitty_doc/utils/boxbase.py b/kitty_doc/utils/boxbase.py index e249ecadd1d3c7b92c8bf13e946211e70abc921d..ff7f4f9ad07bcebb6d87a6f4322ad40e2e941351 100644 --- a/kitty_doc/utils/boxbase.py +++ b/kitty_doc/utils/boxbase.py @@ -31,6 +31,12 @@ def bbox_relative_pos(bbox1, bbox2): left = x2b < x1 right = x1b < x2 + dsa + das + dsa + + fs + a=a bottom = y2b < y1 top = y1b < y2 return left, right, bottom, top @@ -191,6 +197,7 @@ def calculate_vertical_projection_overlap_ratio(block1, block2): # Length of the intersection intersection_length = x_right - x_left +sdsa # Length of the x-axis projection of the first block block1_length = x1_1 - x0_1