Skip to content

[BUG]: non-self-closing <img> tags in docs cause MDX parse errors #281

Description

@pdmack

Summary

Fern's MDX parser requires void elements like <img> to be self-closing (<img ... />). Non-self-closing tags produce a parse error at fern generate / fern docs dev time:

Failed to parse ../docs/architecture.md: Unexpected closing tag `</p>`, expected corresponding closing tag for `<img>`

fern check does not catch this — it validates configuration structure only, not MDX content.

Affected files

  • docs/architecture.md:11<img src="assets/design.png" ...> missing self-close

Fix

  • Add self-closing slash to docs/architecture.md
  • Add a Check MDX safety step to fern-docs-ci.yml that greps for non-self-closing <img> tags and fails CI before merge

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions