Restore numbered university list in Tier 2 (revert checkmark conversion)
Browse files- app/services/normalizer.py +3 -12
app/services/normalizer.py
CHANGED
|
@@ -759,8 +759,7 @@ def _postprocess_tier2(blocks: list[RenderBlock]) -> list[RenderBlock]:
|
|
| 759 |
|
| 760 |
- Second consecutive bullet_list (sub-bullets under Sources of Funds)
|
| 761 |
gets checkmark styling instead of arrows.
|
| 762 |
-
- The numbered university list
|
| 763 |
-
to match the Word document layout.
|
| 764 |
- Bullet item labels (text before colon) are bolded.
|
| 765 |
"""
|
| 766 |
result: list[RenderBlock] = []
|
|
@@ -769,16 +768,8 @@ def _postprocess_tier2(blocks: list[RenderBlock]) -> list[RenderBlock]:
|
|
| 769 |
if blk.block_type == "bullet_list":
|
| 770 |
is_numbered = "hb-numbered-list" in (blk.css_class or "")
|
| 771 |
if is_numbered:
|
| 772 |
-
# University list →
|
| 773 |
-
result.append(
|
| 774 |
-
block_type="bullet_list",
|
| 775 |
-
css_class="hb-bullet-list hb-sub-bullets",
|
| 776 |
-
data={
|
| 777 |
-
"entries": blk.data.get("entries", []),
|
| 778 |
-
"html_entries": blk.data.get("html_entries", False),
|
| 779 |
-
"ordered": False,
|
| 780 |
-
},
|
| 781 |
-
))
|
| 782 |
prev_was_bullet = False
|
| 783 |
elif prev_was_bullet:
|
| 784 |
# This is the sub-bullet list → use checkmark class + bold labels
|
|
|
|
| 759 |
|
| 760 |
- Second consecutive bullet_list (sub-bullets under Sources of Funds)
|
| 761 |
gets checkmark styling instead of arrows.
|
| 762 |
+
- The numbered university list keeps its numbering (ordered list).
|
|
|
|
| 763 |
- Bullet item labels (text before colon) are bolded.
|
| 764 |
"""
|
| 765 |
result: list[RenderBlock] = []
|
|
|
|
| 768 |
if blk.block_type == "bullet_list":
|
| 769 |
is_numbered = "hb-numbered-list" in (blk.css_class or "")
|
| 770 |
if is_numbered:
|
| 771 |
+
# University list → keep as numbered ordered list
|
| 772 |
+
result.append(blk)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 773 |
prev_was_bullet = False
|
| 774 |
elif prev_was_bullet:
|
| 775 |
# This is the sub-bullet list → use checkmark class + bold labels
|