fix(ProsePre): get code from DOM if code prop is missing#6333
fix(ProsePre): get code from DOM if code prop is missing#6333benjamincanac merged 2 commits intov4from
code prop is missing#6333Conversation
📝 WalkthroughWalkthroughThe Pre.vue component's copy button handler was refactored: it now calls a new Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 the current code and only fix it if needed.
Inline comments:
In `@src/runtime/components/prose/Pre.vue`:
- Line 75: The <pre> template in Pre.vue (the element using ref "preTemplateRef"
and class computed via ui.base with uiProp?.base and props.class) is missing the
required slot marker; add the attribute data-slot="default" (or the appropriate
slot name) to that <pre> element so it includes the slot identification per the
project's slot convention. Ensure the attribute is added to the same element
that has ref="preTemplateRef" and v-bind="$attrs" so slot tooling can detect it.
🪄 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
Run ID: bb7e1f7c-6648-4b82-957a-fe0cb0c4c0e8
📒 Files selected for processing (1)
src/runtime/components/prose/Pre.vue
commit: |
code prop was missingcode prop is missing
🔗 Linked issue
❓ Type of change
📚 Description
📝 Checklist