Skip to content

docs(common/accessories): convert multiline pre blocks to standard code block format - #2042

Closed
tangzz-radxa wants to merge 2 commits into
radxa-docs:mainfrom
tangzz-radxa:docs/fix-common-accessories-pre-20260821
Closed

docs(common/accessories): convert multiline pre blocks to standard code block format#2042
tangzz-radxa wants to merge 2 commits into
radxa-docs:mainfrom
tangzz-radxa:docs/fix-common-accessories-pre-20260821

Conversation

@tangzz-radxa

Copy link
Copy Markdown
Contributor

Summary

Convert multi-line <pre> code blocks in the shared common/accessories/ templates to standard code block format, fixing an extra blank line rendered inside code blocks on all pages that use these templates (e.g. interface-usage pages across products).

Root cause

Multi-line <pre> blocks in MDX are parsed into <pre><p>...</pre> (inner text wrapped in <p>), and the <p> default margin renders as a visible blank line inside the code block. Single-line <pre> blocks were unaffected.

Change

  • Blocks containing JSX props (e.g. {props.model}) → <pre>{...}</pre> template-literal form so dynamic values still render.
  • Plain text blocks (commands/output) → standard ``` fence (bash/text) with HTML tags (<strong>, `
    `) removed and ` ` normalized.
  • Both Chinese (docs/common/accessories/) and English (i18n/en/.../common/accessories/) versions updated. No command/content changes.

Files: _fan.mdx, _usb.mdx, _waveshare-35-display.mdx, _m.2-extension-board.mdx, _m.2-sata-break-board.mdx, _mobile-lte-em05-ce.mdx (+ en counterparts).

Whitespace/markup-only change.

@tangzz-radxa
tangzz-radxa requested a review from a team as a code owner August 21, 2026 07:01
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.

2 participants