Skip to content

format: Allow HTML/JSX-like syntax in @code blocks #3

@jack5github

Description

@jack5github

Affected surface

source syntax

Use case

Documents that demonstrate and/or explain HTML, JSX or XML code, such as AI output regarding changes made to such documents and breakdowns of components of language libraries. It should be possible to use HTML/JSX-like syntax inside @code blocks regardless of the specified language.

Why the current format cannot cover it

  • Attempted to use HTML/XML elements in @code lang="html" block. Error: @code contains raw HTML/JSX-like syntax

Required updates

  • Spec text updated
  • AST schema updated when shape changes
  • Language contract updated when language fields change
  • Profile contract updated when profile behavior changes
  • Valid fixtures added
  • Invalid fixtures added when rejection behavior matters
  • JavaScript, Python, and Rust behavior updated together
  • Conformance updated
  • Security model stated for renderer or profile changes

Compatibility impact

Compatible language change. Existing documents will remain valid. Rendered output should be unaffected as content inside @code blocks should be treated as pre-formatted code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions