Skip to content

Fix table parsing and auto-format reliability#13

Draft
krotname wants to merge 1 commit into
mainfrom
agent/fix-table-parsing-and-autoformat
Draft

Fix table parsing and auto-format reliability#13
krotname wants to merge 1 commit into
mainfrom
agent/fix-table-parsing-and-autoformat

Conversation

@krotname

Copy link
Copy Markdown
Owner

What changed

  • fixed CSV/TSV conversion for escaped pipes, malformed quoted fields, multiline current blocks, explicit empty records, surrounding spaces, and delimiter selection
  • tightened Markdown table detection so Setext headings and separator/header column mismatches are not reformatted as tables
  • preserved Unicode grapheme clusters while wrapping long cells and replaced per-character width shrinking with an equivalent batch algorithm
  • debounced document auto-formatting, made stale timer callbacks cancellable, and guarded disposed editors/projects and unrelated VFS events
  • limited Reformat Selection to intersecting tables and delegated Tab normally for multiple carets
  • handled oversized Insert Table dimensions without an action crash
  • expanded shared golden, editor regression, and performance coverage

Why

Several independent edge cases could corrupt converted text, misidentify prose as a table, split a grapheme cluster, trigger stale automatic formatting after a manual edit, or perform quadratic work on large documents/cells.

Impact

Table editing and conversion are safer and more predictable. Automatic formatting now coalesces rapid edits, stays scoped to active Markdown editors, and remains cancelable. The shared Java/C++ golden fixture documents the cross-plugin behavior.

Validation

  • gradlew.bat check buildPlugin corePerformance --offline --no-daemon --console=plain --no-build-cache --rerun-tasks
  • JaCoCo core line coverage: 90.85%
  • Plugin Verifier 1.407 against IntelliJ IDEA Community 2022.3.3: Compatible; dynamic plugin eligible
  • 1,000,000-character header auto-fit benchmark: 107 ms median (1,500 ms threshold)
  • 50,000 pipe-heavy non-table lines scan: 23 ms median (500 ms threshold)
  • shared golden fixture normalized-identical to NppMarkdownTableEditor
  • secret scan and git diff --check passed

@codecov

codecov Bot commented Jul 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 79.16667% with 25 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...krot/markdowntableidea/core/MarkdownTableCore.java 79.16% 15 Missing and 10 partials ⚠️

📢 Thoughts on this report? Let us know!

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