fix(markdown): preserve HTML in fenced code blocks#720
Conversation
|
Warning Review limit reached
Next review available in: 19 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
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 |
Greptile SummaryThis PR fixes HTML escaping inside fenced code blocks by lifting the per-line
Confidence Score: 5/5Safe to merge — the change is narrowly scoped to a well-tested escape filter, and the Clippy fixes are no-op reformats. The stateful fence-tracking logic is straightforward and its edge cases (info strings, trailing whitespace on closing fences, indented lines, longer fences, unclosed fences) are each covered by a dedicated unit test. The opening/closing fence heuristics deliberately match only the shape emitted by No files require special attention. Important Files Changed
Reviews (3): Last reviewed commit: "chore: apply clippy fixes" | Re-trigger Greptile |
1bcee65 to
faee02a
Compare
Summary
Preserve literal
<characters inside conventional fenced code blocks while continuing to HTML-encode them in surrounding Markdown.The escape filter previously processed each line independently, so it could protect inline and indented code but could not tell when a line belonged to a multiline fenced block.
This change deliberately supports the fence shape generated by
replace_code_fences: column-zero fences beginning with exactly three backticks, optional info strings, and closing fences with optional trailing whitespace. It does not attempt to implement the full Markdown specification.After rebasing, CI also exposed Rust 1.97 Clippy drift in three existing formatting expressions. The follow-up commit accepts exactly those no-behavior autofixes so the render cleanliness assertion remains stable.
Supersedes #386.
Addresses the escaping problem reported in jdx/mise#6949.
Validation
mise run render(clean worktree afterward)mise run testmise run lint