Skip to content

fix: align markdown preview with renderer config#1126

Open
jiangmuran wants to merge 1 commit intohydro-dev:masterfrom
jiangmuran:fix/markdown-preview-consistency
Open

fix: align markdown preview with renderer config#1126
jiangmuran wants to merge 1 commit intohydro-dev:masterfrom
jiangmuran:fix/markdown-preview-consistency

Conversation

@jiangmuran
Copy link

@jiangmuran jiangmuran commented Feb 4, 2026

Summary

  • align markdown preview plugin order with backend renderer
  • align linkify configuration for consistent preview rendering

Related Issues

Testing

  • not run (frontend-only change)

Summary by CodeRabbit

  • Bug Fixes
    • Resolved duplicate plugin registrations in the markdown editor.
    • Enabled LaTeX/KaTeX support for mathematical expressions in Markdown content.
    • Adjusted plugin initialization order for improved performance.

@coderabbitai
Copy link

coderabbitai bot commented Feb 4, 2026

Walkthrough

This pull request modifies the Markdown-it editor plugin configuration in a single file. It removes linkify exceptions for .zip and .mov file extensions, reorders the plugin initialization sequence by placing the Imsize plugin earlier in the list (before Footnote), explicitly adds the katex plugin, and eliminates duplicate plugin registrations for both Imsize and katex. The total change is 2 lines added and 4 lines removed.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: align markdown preview with renderer config' directly describes the main objective of the PR - aligning the markdown preview with the backend renderer configuration.
Linked Issues check ✅ Passed The PR addresses issue #1120 by adjusting plugin order and linkify configuration in the markdown editor to match the backend renderer, directly resolving the rendering consistency problem documented in the issue.
Out of Scope Changes check ✅ Passed All changes are scoped to the mdeditor.ts plugin configuration and directly address the linked issue about markdown preview consistency with no unrelated modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

题面Markdown预览的渲染和网页实际渲染不一致

1 participant