Fix inline callout regex and li rendering for markdown links#3355
Conversation
The MathInlineAnnotation regex excluded `/` from callout text, breaking link syntax like `[link](path/to/file.md)`. Also fix the inline annotation renderer to emit `<li>` and content without an intermediate newline so the HTML structure matches what tests assert. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis pull request enables inline code callout annotations to use slash-containing identifiers. The regex pattern in 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches✨ Simplify code
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 |
Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Why
PR #3324 added support for inline Markdown in automatic callouts, but CI started failing on main after merge. The
MathInlineAnnotationregex excluded/from callout comment text, so any comment containing a link (e.g.[link](path/to/file.md)) was silently skipped and no callout list was generated. The test for this had been passing spuriously becauseShouldContainHtmlhad a separate bug comparing actual HTML to itself (fixed in #3346) — once that was fixed, the real failure became visible.What
/from the[^""#]exclusion inMathInlineAnnotationso callout text can contain forward slashes (needed for Markdown link syntax like[text](path/file.md))EnhancedCodeBlockHtmlRendererto emit<li>and its inline content without an intermediate newline (Writeinstead ofWriteLine), matching the HTML structure the test asserts