Skip to content

fix(editor): stabilize visual markdown escaping#548

Merged
murongg merged 1 commit into
mainfrom
fix/issue-542-markdown-escaping
Jul 17, 2026
Merged

fix(editor): stabilize visual markdown escaping#548
murongg merged 1 commit into
mainfrom
fix/issue-542-markdown-escaping

Conversation

@murongg

@murongg murongg commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • preserve live inline code Markdown when its content starts with punctuation that the configured serializer escapes
  • keep HTML-looking and backslash-escaped link-looking text typed in the visual editor literal
  • avoid emitting a leading \[ for escaped link-looking literals because Markra reserves it as a math delimiter

Why

Issue #542 exposed multiple cases where visual input intent and serialized Markdown diverged. Simple live Markdown should retain its source, while source-level HTML and backslash-escaped link syntax typed in the visual editor should remain literal text across save and reload.

Validation

  • pnpm test passed: 2,409 tests
  • pnpm build passed
  • desktop vendor chunk verification imported all 15 vendor chunks successfully
  • focused visual editor regressions passed for inline code punctuation, HTML-looking literals, escaped link-looking literals, and ordinary live links

Risk

  • source restoration now asks the configured serializer for its exact escaping output before replacing live Markdown candidates
  • escaped link-looking literal handling is excluded from inline code and fenced code ranges
  • raw HTML parsing/rendering from source mode remains separate and is tracked by [Bug]: html标签不能正常渲染 #543

Related Issues

Preserve live inline code source using the configured serializer while keeping HTML- and escaped-link-looking visual input literal.

Closes #542
@vercel

vercel Bot commented Jul 17, 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, Comment Jul 17, 2026 3:26am

@murongg
murongg merged commit c5a260e into main Jul 17, 2026
21 checks passed
@murongg
murongg deleted the fix/issue-542-markdown-escaping branch July 17, 2026 10:51
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.

[Bug]: 特殊字符自动转义导致bug

1 participant