feat: solve the problem of TinyEditor document demo not displaying - #113
Conversation
WalkthroughAdds VitePress support for TinyEditor demo markdown blocks, loads Fluent Editor styles, and isolates TinyEditor preview list styling from VitePress defaults. ChangesTinyEditor documentation integration
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.vitepress/theme/markdown/tiny-editor-demo.ts:
- Around line 10-13: Update transformTinyEditorDemoMarkdown to parse or
otherwise track Markdown structure before converting demo directives, so
same-line :::demo src=... ::: syntax is handled while matching text inside
fenced code blocks remains unchanged. Preserve the existing vuePath resolution
and replacement output, and add regression coverage for both inline directives
and fenced-block content.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 15112c3b-4678-4006-83f7-26356daa4c40
📒 Files selected for processing (4)
.vitepress/config.mts.vitepress/theme/index.ts.vitepress/theme/markdown/tiny-editor-demo.ts.vitepress/theme/style.css
文档系统中TinyEditor下面的:::demo src=... 无法解析,是因为主站用的是 vitepress-demo-plugin(只认 ),而 tiny-editor 原文是 @vitepress-code-preview 的 :::demo 语法,导致demo无法显示


修改前
修改后
Summary by CodeRabbit
New Features
Bug Fixes