Commit 353dadc
committed
refactor: improve HTMLFormatter code readability and maintainability
- Extract all inline CSS styles to named class constants
- Split large methods into smaller, focused helper methods
- Add reusable helper methods for common patterns:
- _skip_whitespace() for navigating inline blocks
- _is_bullet_marker() for identifying bullet markers
- _extract_bullet_parts() for parsing bullet list lines
- _format_bullet_list_item() for formatting list items
- Split block formatting into dedicated methods:
- _format_header_block(), _format_code_block(), _format_divider_block()
- _format_link_block(), _format_inline_code_block(), _format_mention_block()
- _format_table_header(), _format_table_body(), _format_table_row()
- _build_expandable_summary() for expandable block arrows
No functional changes - all 36 HTML format tests passing
All pre-commit checks passing (black, isort, flake8, mypy)1 parent db3c252 commit 353dadc
1 file changed
+210
-150
lines changed
0 commit comments