Skip to content

feat: add table cell borders and centralize markdown styles#71

Merged
yishuiliunian merged 2 commits intomainfrom
feat/markdown-table-borders
Apr 3, 2026
Merged

feat: add table cell borders and centralize markdown styles#71
yishuiliunian merged 2 commits intomainfrom
feat/markdown-table-borders

Conversation

@yishuiliunian
Copy link
Copy Markdown
Contributor

Summary

  • Add full box-drawing borders (┌┬┐ ├┼┤ └┴┘ ) to markdown table rendering
  • Centralize all hardcoded styles into MarkdownStyles — 7 new fields (link_url, image_marker, task_checked, task_unchecked, footnote_ref, table_border, table_header)
  • Extract non-table tests to markdown_elements_test.rs (200-line limit compliance)

Changes

  • styles.rs — 7 new style fields with defaults
  • writer_table.rs — border rendering via border_line(), styles injected as params
  • writer_inline.rs — replace 5 hardcoded Color::DarkGray/Color::Green with self.styles.*
  • markdown_table_test.rs — border assertions, non-table tests extracted
  • markdown_elements_test.rs — new file for task list, link, image, footnote tests
  • suite.rs — register new test module

Test plan

  • bazel test //crates/loopal-tui:loopal-tui_test passes
  • bazel build //crates/loopal-tui/... --config=clippy zero warnings
  • CI passes

Add full box-drawing borders (┌┬┐ ├┼┤ └┴┘ │) to markdown table
rendering for cleaner visual presentation.

Centralize all hardcoded styles from writer_inline.rs and
writer_table.rs into MarkdownStyles — link_url, image_marker,
task_checked/unchecked, footnote_ref, table_border, table_header
now have dedicated fields instead of inline Color/Modifier literals.

Extract non-table tests (task list, link, image, footnote) from
markdown_table_test.rs into markdown_elements_test.rs to respect
the 200-line file limit.
@yishuiliunian yishuiliunian merged commit 564b008 into main Apr 3, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant