Skip to content

fix: defer streaming math rendering#608

Merged
YishenTu merged 2 commits into
mainfrom
feature/gh-597-defer-math
May 5, 2026
Merged

fix: defer streaming math rendering#608
YishenTu merged 2 commits into
mainfrom
feature/gh-597-defer-math

Conversation

@YishenTu
Copy link
Copy Markdown
Owner

@YishenTu YishenTu commented May 5, 2026

Summary

  • Fixes Feature request: Defer math rendering during streaming #597 by deferring dollar-delimited math parsing during live streaming renders.
  • Adds a shared markdown utility that escapes $ and $$ delimiters outside inline code, fenced code, and raw HTML tags for transient streaming output.
  • Re-renders completed text blocks once with the original markdown so final MathJax rendering remains unchanged.
  • Adds a default-on general setting for deferring math rendering during streaming, including localized settings labels.

Validation

  • node scripts/run-jest.js --config .context/jest-gh-597.config.cjs --runInBand --silent=false
  • npm run typecheck
  • npm run lint
  • npm run test
  • npm run build

The GH-597 validation script now reports zero live unescaped math renders and zero live unclosed math renders, while preserving one final render with completed markdown.

YishenTu added 2 commits May 5, 2026 12:42
…math

# Conflicts:
#	src/app/settings/defaultSettings.ts
#	src/core/types/settings.ts
#	src/i18n/locales/de.json
#	src/i18n/locales/en.json
#	src/i18n/locales/es.json
#	src/i18n/locales/fr.json
#	src/i18n/locales/ja.json
#	src/i18n/locales/ko.json
#	src/i18n/locales/pt.json
#	src/i18n/locales/ru.json
#	src/i18n/locales/zh-CN.json
#	src/i18n/locales/zh-TW.json
#	src/i18n/types.ts
#	tests/unit/providers/claude/types/types.test.ts
@YishenTu YishenTu merged commit 83dd3a2 into main May 5, 2026
3 checks passed
@YishenTu YishenTu deleted the feature/gh-597-defer-math branch May 5, 2026 04:49
bulynbulyn pushed a commit to bulynbulyn/claudian-wsl that referenced this pull request May 23, 2026
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.

Feature request: Defer math rendering during streaming

1 participant