Skip to content

fix: restore HTML img tags broken by markdown image conversion#203

Open
liangzhuohua wants to merge 1 commit into
sipeed:mainfrom
liangzhuohua:fix-restore-html-img-tags
Open

fix: restore HTML img tags broken by markdown image conversion#203
liangzhuohua wants to merge 1 commit into
sipeed:mainfrom
liangzhuohua:fix-restore-html-img-tags

Conversation

@liangzhuohua

Copy link
Copy Markdown
Contributor

Summary

Revert the homepage files (docs/pages/index/README.md and docs/pages/index_en/README.md) to their state before commits 1bfa834 and aa5abbb.

Problem

Commits 1bfa834 and aa5abbb replaced tags inside raw HTML blocks with markdown image syntax (alt) surrounded by blank lines. According to the CommonMark spec, a blank line terminates a raw HTML block. This caused:

  • Raw HTML blocks to fragment prematurely
  • Subsequent HTML tags (e.g.
    , ) to fall outside any HTML block
  • Indented HTML tags (≥4 spaces) to be treated as paragraph text or indented code blocks
  • Raw HTML code to render as visible text on the homepage

Changes

  • Restore original tags in all raw HTML block contexts
  • Remove the blank lines that were breaking HTML block parsing
  • Preserve CSS class attributes on standalone images (e.g. text-center, white_border, shadow-xl)

Affected files

File Description
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━
docs/pages/index/README.md Chinese homepage
─────────────────────────────── ──────────────────
docs/pages/index_en/README.md English homepage

Revert docs/pages/index/README.md and docs/pages/index_en/README.md
to the state before commits 1bfa834 and aa5abbb, which replaced
<img> tags inside raw HTML blocks with markdown image syntax.
This caused HTML block fragmentation and raw HTML tags rendering
as visible text on the homepage due to CommonMark raw HTML block
rules being broken by blank lines.
@kingo0807

Copy link
Copy Markdown
Contributor

imageThe problem was caused by changing the image file format at that time.

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