Skip to content

A generated span that opens with --- is formatted as YAML front matter #697

Description

@Jamie-BitFlight

What happens

Since #668's fix (PR #690), each generated span is formatted as its own Markdown document. A span that opens with a --- … --- block is the start of that document, so prettier parses it as YAML front matter and formats it with the yaml plugin.

await formatMarkdown("---\ntitle: 'x'\n---\n\nbody")
// => "---\ntitle: \"x\"\n---\n\nbody\n"

The quotes are normalised as YAML. GitHub renders the same block as a thematic break followed by a setext heading, not as front matter.

When it bites

An action.yml description that begins with a --- line reaches the description section's span. In the whole-document formatting that #690 replaces, the block sat mid-document and was not front matter.

Severity

Low: it needs a description that opens with ---, and the change is YAML normalisation inside a span this tool generates. Nothing outside the markers is touched.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

releasedThis issue/pull request has been released.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions