Skip to content

fix(editor): preserve authored blank line height - #637

Merged
murongg merged 1 commit into
v2from
fix/blank-line-height-stability
Aug 3, 2026
Merged

fix(editor): preserve authored blank line height#637
murongg merged 1 commit into
v2from
fix/blank-line-height-stability

Conversation

@murongg

@murongg murongg commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • keep every authored blank source line as a normal editable CodeMirror row
  • remove the hidden separator, 8px block-gap widget, atomic selection redirect, and compensating Enter insertion
  • align image continuation and Preview/Source recreation tests with source-faithful blank-line behavior

Why

An empty row at the end of the document was reclassified after text was entered below it. The editor then hid the real row and replaced it with an 8px layout widget, which made content move upward and destabilized caret, IME, focus, reopen, and mode-switch behavior.

Validation

  • pnpm --filter @markra/editor test — 413 tests passed
  • pnpm --filter @markra/editor build — passed
  • pnpm --filter @markra/editor typecheck:test — passed
  • pnpm --filter @markra/app test — 1484 tests passed
  • pnpm --filter @markra/app build — passed
  • pnpm --filter @markra/app typecheck:test — passed
  • Safari/WebKit runtime QA — the authored blank row remained visible after entering text below it

Risk

  • Preview editing now displays every authored source blank line at normal line height, so documents containing many blank lines will appear taller.
  • This intentionally does not implement the compact blank-line behavior requested in [Editor]: 出现大量的空行 #628; editable Preview remains source-faithful instead.

@vercel

vercel Bot commented Aug 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
markra-web Ready Ready Preview Aug 3, 2026 3:20am

@murongg
murongg merged commit 9d905cd into v2 Aug 3, 2026
21 checks passed
@murongg
murongg deleted the fix/blank-line-height-stability branch August 3, 2026 03:23
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