Skip to content

Unify Markdown block rendering and table source preservation - #80

Merged
BinaryOutlook merged 6 commits into
mainfrom
feat/editor-source-preservation
Sep 27, 2026
Merged

BinaryOutlook merged 6 commits into
mainfrom
feat/editor-source-preservation

Conversation

@BinaryOutlook

@BinaryOutlook BinaryOutlook commented Sep 26, 2026 •

Copy link
Copy Markdown
Owner

Blank source lines should separate Markdown blocks without creating phantom visual paragraphs, and an edit should preserve the source of untouched blocks and tables. This integrates the block renderer and source-preserving serializer from #79 with the table-format setting and table source retention from #78.

Supersedes #78 and #79. The integration merge retains both original branch histories. This draft is for personal review before any decision to merge into main; it does not select or publish a release.

Integrated behavior

  • Keep the block-based parser, paragraph/line-break behavior, and source/separator preservation from Fix phantom blank lines in Markdown rendering and editing #79.
  • Port Preserve untouched tables and add aligned source formatting #78's binary-markdown.tableSourceFormat setting (aligned by default, compact for the previous layout) into that serializer. Format a table when it changes; preserve untouched neighboring tables, prose, and block separators.
  • Preserve explicit left, center, and right alignment, including header-only tables, while distinguishing empty editing placeholders from authored <br> content.
  • Escape pipes inside table code spans and link/image destinations so editing a neighboring cell cannot split existing content into new columns on reopening.
  • Strip retained source metadata from partial clipboard HTML so unselected table text is not copied.
  • Combine both unit/browser/native suites, add mixed paragraph-and-table regressions, and update the maintained guides to describe the combined behavior and the published 0.4.0 baseline.

Validation

Validated source: ffbdad524d393aa783760f4829cb995d8b9d6405 (Node 24.21.0).

  • Full extension compilation and Electron TypeScript compilation passed.
  • Unit and real-converter checks: 311 passed; the separate VSIX archive/runtime gate subsequently passed with the built package.
  • Final focused browser checks: 183 passed, with no retries.
  • Full browser suite on the final build: 1,147 passed in 6.4 minutes, two Chromium workers, no retries.
  • Installed VSIX paragraph/table suites passed in an isolated macOS arm64 profile using VS Code 1.138.0, including setting scope, undo, native save/reopen, export, and unchanged neighboring source checks.
  • Documentation checks passed (61 text files, 462 local links). All seven affected Markdown files received separate full-source and rendered-preview reviews; whitespace checks passed.
  • Lint passed with 11 existing warnings and no errors.
  • Integration CI run: package build passed; Ubuntu, macOS, Windows, and minimum-supported VS Code validation were still running at the handoff snapshot. The two original PRs' passing CI is not treated as validation of the combined revision.

An earlier full browser attempt recorded 32 timeouts. The final result above is a fresh complete run with host idle sleep inhibited, not a retry-only pass; the earlier timeout cause was not established.

Personal review

  • Open a mixed document with soft wraps, intentional hard breaks, loose lists, extra blank separators, and two differently formatted tables.
  • Edit one paragraph and one table; save, reopen, switch Source mode, and inspect that unrelated source remains intact.
  • Exercise aligned/compact table output, explicit alignment, empty cells, escaped pipes, row operations, and undo/redo.
  • Copy a partial selection crossing a table and inspect both clipboard content and export output.
  • Review the final CI results before deciding whether this branch should merge.

The local review package keeps numeric version 0.4.0 and is an unreleased development snapshot identified by its full source commit and checksum. Electron settings integration was compiled but not exercised in the Electron runtime. The existing inline renderer remains; this does not claim complete CommonMark/GFM conformance or close every aspect of #16. Visual edits continue to normalize line endings to LF, and edited blocks may normalize their own syntax.

@BinaryOutlook
BinaryOutlook marked this pull request as ready for review September 27, 2026 06:30
@BinaryOutlook
BinaryOutlook merged commit e871e7a into main Sep 27, 2026
7 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