Skip to content

fix(markdown): inline details inside table cells stay one-line#623

Merged
rainxchzed merged 1 commit into
mainfrom
fix/markdown-details-in-table
May 16, 2026
Merged

fix(markdown): inline details inside table cells stay one-line#623
rainxchzed merged 1 commit into
mainfrom
fix/markdown-details-in-table

Conversation

@rainxchzed
Copy link
Copy Markdown
Member

@rainxchzed rainxchzed commented May 16, 2026

`

Details` inside a GFM table cell (kavishdevar/librepods README pattern) was emitted as a multi-line fenced code block, which terminates the table mid-row. Result: cells from that row onward render as raw pipe-separated text.

Fix: detect inline match (entire `

...
` on one line) and emit `summary: body` instead — flat single-line replacement that keeps the table parser happy. Multi-line matches still go through the fenced `ghs-details` path for ExpandableDetails rendering.

Test plan

  • Compile clean
  • Device: open kavishdevar/librepods README — feature-availability table renders end-to-end. "Note for Android" details cell shows as bold + body inline.

Summary by CodeRabbit

Release Notes

  • Improvements
    • Content rendering now intelligently handles inline and multiline detail blocks differently—inline details display as clean, single-line formatted text instead of code blocks, improving readability and reducing visual clutter
    • Multiline detail blocks continue with existing rendering behavior to maintain consistent formatting and proper content structure

Review Change Stack

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rainxchzed has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 16, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 806ec886-2345-4a73-83da-3c2705ad8bdd

📥 Commits

Reviewing files that changed from the base of the PR and between 5191128 and 62f208d.

📒 Files selected for processing (1)
  • feature/details/data/src/commonMain/kotlin/zed/rainxch/details/data/utils/preprocessMarkdown.kt

Walkthrough

The preprocessMarkdown utility now detects whether HTML <details> blocks span a single line or multiple lines, and applies distinct rendering strategies: inline details render as concise bold text, while multiline details continue using the existing fenced code block format.

Changes

HTML Details Inline Rendering

Layer / File(s) Summary
Inline vs multiline details rendering
feature/details/data/src/commonMain/kotlin/zed/rainxch/details/data/utils/preprocessMarkdown.kt
Conditional logic detects single-line <details> blocks and renders them as compact **summary**, **summary**: body, body, or empty string. Multiline details continue using the fenced ghs-details|<encodedSummary> block format.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • OpenHub-Store/GitHub-Store#620: Extends preprocessMarkdown with additional HTML→Markdown conversion rules for <pre><code>, blockquotes, sub/sup, and HTML entities.
  • OpenHub-Store/GitHub-Store#617: Adds emoji preprocessing step to preprocessMarkdown via new EmojiShortcodes.render(...) integration.

Poem

🐰 Inline details now shine so bright,
No fences needed for single-line sight,
Bold summaries dance in compact delight,
While tall details still block out just right!
~Rabbit

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/markdown-details-in-table

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@rainxchzed rainxchzed merged commit bc72ced into main May 16, 2026
1 check was pending
@rainxchzed rainxchzed deleted the fix/markdown-details-in-table branch May 16, 2026 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant