Repository navigation
Support GitHub-style markup rendering - #6
Conversation
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThe PR extends markdown rendering with GitHub HTML restoration improvements and math expression support. Changes include: generalized raw HTML tag restoration (picture, source, details) with entity decoding; math parsing via Comrak extensions; CSS overrides for image alignment and math styling; build documentation clarification; and comprehensive test coverage across fixtures, integration, and unit tests. Changes
Sequence Diagram(s)sequenceDiagram
participant Parser as Markdown Parser
participant Segment as collect_text_segments
participant Pipeline as Render Pipeline
participant CSS as CSS Styling
participant Browser as Browser Output
Parser->>Parser: Detect $...$ or $$...$$ syntax
Parser->>Parser: Create NodeValue::Math(literal, flags)
Parser->>Segment: Process Math node
Segment->>Segment: Convert to $...$ or $$...$$ text
Segment->>Pipeline: Emit InlineSegment with math text
Pipeline->>Pipeline: Wrap in span[data-math-style]
Pipeline->>CSS: Render HTML with data-math-style attr
CSS->>CSS: Apply nowrap for inline math
CSS->>CSS: Apply block layout for display math
CSS->>Browser: Display formatted math
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ 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 |
This PR expands GitHub-style markup coverage in the rich HTML renderer with fixtures and regression tests for centered raw HTML wrappers,
details/summary,picture/source, and math expressions.It restores safe raw HTML more generically, preserves math in the plain/headless path, respects explicit
img heightattributes, and decodes double-escaped entities like inside restored raw HTML.It also makes
make buildrefresh./bin/mdv, updates the related docs and contract tests, and refreshes the trackedbin/mdvartifact.Verification included
cargo test --workspace --all-targets,cargo clippy --workspace --all-targets --all-features -- -D warnings, andmake build && TERM=xterm-kitty ./bin/mdv ~/Work/daikolabs/marry-fun/README.md.Summary by CodeRabbit
Release Notes
New Features
$...$) and display ($$...$$) math notation.<details>and<summary>elements for collapsible content.<picture>and<source>elements with media queries.Bug Fixes
Documentation