Skip to content

Read Every Empty List Item Marker as an Item in prose_lint.py #3243

Closed

Description

@ptr727

The shape

LIST_MARKER in .github/actions/prose-gate/prose_lint.py requires whitespace after the marker, so a list item that opens empty, with its text on the next line, is never read as an item. A bare - is handled where the setext check reads it, as of #3236's change, but *, +, 1., and 1) alone on a line land in the paragraph as a word, and the paragraph after them is measured against column 0 rather than the item's content column.

Constructed case:

*
  First sentence of the item, long enough to approach the cap
    <div>
  Second sentence.

GitHub reads the <div> line as two columns past the item's content, so it opens an HTML block and ends the paragraph. Rendering *\n para\n <div>\n *x* leaves *x* raw inside the <li>. The prose gate reads the <div> line as four columns past column 0, continues the paragraph, and measures the two sentences as one.

Before #3236's change the prose gate ended the paragraph at any tag line, so this shape read correctly by accident. No tracked Markdown file opens an item empty today.

Expected

An empty item opening on any marker sets the list state the same way a bare - does, most likely by letting LIST_MARKER accept the end of the line, with each marker pinned by a test.

Found by the local review of the #3236 fix.

Activity

  1. added
    enhancement
    script
    on Oct 19, 2026
  2. added 2 commits that reference this issue on Oct 19, 2026
    d49c49b
    36251ed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementscript

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions