Repository navigation
fix: preserve whitespace-only code spans in Markdown export - #254
Conversation
|
Reviewed and fixed the spaces-only export behavior. The original patch compensated for markdown-it 14.1.0 trimming all-space spans, but CommonMark preserves those spaces, so adding padding would introduce two unwanted spaces in compliant renderers. The exporter now uses its existing inline-HTML convention for empty and spaces-only code spans, preserving the exact content across both behaviors. Reference: https://spec.commonmark.org/0.31.2/#code-spans Expanded the regression to cover one, two, three, four, and eight spaces. It failed before the correction and passes afterward. Validation passed: typecheck, all 428 tests, webpack development build, format check, and git diff whitespace check. Two unchanged issue templates needed working-tree LF normalization after switching from master; that produced no committed content changes. |
Summary
Verification
npm test— passed (428 tests); the new test failed on untoucheddevelopbefore the fix.npm run compile— passed.npm run typecheck— passed.npm run format:check— passed.git diff --check— passed.Risk
This was generated by an AI agent (vycdev2). Please verify any changes before merging or applying.