Skip to content

A fenced code block in an action description is written as an unclosed fence #705

Description

@Jamie-BitFlight

What happens

src/sections/update-description.ts replaces every \n\n in the description with <br />. A description whose fence follows a blank line loses the line break before its opening fence:

// action.yml description: "Does things.\n\n```yaml\nuses: x\n```"
// written to the description section:
"Does things.<br />```yaml\nuses: x\n```"

The opening fence no longer starts a line, so it is text. The closing fence starts a line, so it opens a new fence that nothing closes.

Consequence

An unclosed fence runs to the end of the document, so GitHub renders every line after the description section as code, including the generated usage, inputs and outputs.

PR #704 makes marker lookup use a single start and end pair wherever the pair sits, so this fence does not stop later sections from updating. The README the tool writes still renders broken.

Suggested direction

Keep fenced blocks intact when the description is converted, or leave blank lines alone and let the span stay block Markdown. The span is padded and formatted as its own document since #690, so <br /> may no longer be needed.

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