Skip to content

v0.1.6

Latest

Choose a tag to compare

@github-actions github-actions released this 10 Aug 05:50
· 10 commits to main since this release
ca5450e

More of your prose reflows, because the tool stopped guessing.

The rules deciding where a line may not break — inside inline code, a link, a bare URL — used to be hand-written approximations of Markdown's inline grammar, and the hardest one, GitHub's bare-URL autolinking, was never approximated at all: paragraphs near a URL were skipped outright rather than risk getting it wrong.
Those rules now come from the same parser that renders the document, so the answer agrees with the renderer by construction.
The practical effect is coverage. A code span that ends on a URL — `curl https://example.com/install.sh`, how documentation writes a command — no longer stops its paragraph from reflowing; on a 263-file docset that shape alone accounted for 91 of the 117 lines that still would not reflow.

Nothing you must act on: no flags, config keys, or API changes.
Output for a paragraph that already reflowed is unchanged except where a fix below applies.

Changed

  • More prose now reflows near bare URLs: a paragraph that contains both a URL and a stray backtick is no longer skipped wholesale (#30).
    The spans reflow must not break inside — inline code, links, autolinks — are now read from the same Markdown parser that renders the document, so bare-URL autolinking is handled exactly as the renderer handles it instead of being approximated and then guarded against with a conservative skip.

Fixed

  • Wrapping list-item prose so that **-style text lands on the marker line of a nested list no longer lets the result reparse as a thematic break that destroys the list; the escape now judges the line the way a reparse consumes nested container markers (0) * and the like).
  • A paragraph containing a raw <?…?> processing instruction or <!…> comment/declaration outside inline code now passes through untouched instead of reflowing unstably; the same constructs inside backticks keep reflowing normally.
  • A run of repeated same-label footnote-style definitions ([^0]: … twice, then prose) no longer keeps re-joining on every pass; such paragraphs now pass through untouched (#35).
  • A MkDocs admonition written without a blank line after its marker is no longer flattened into one paragraph, which stopped it rendering as a callout (#31, contributed by Karl Isenberg).
    That spelling is a single paragraph to CommonMark, since the indented body is a lazy continuation rather than the code block the blank-line spelling produces.
    The marker line is now immovable and the body carries the 4-space indent the extension requires, the same treatment a footnote definition already gets.
  • Reflowing a tab-indented list-item body no longer risks turning it into a thematic break (#32, found by Karl Isenberg).
    Two emphasis-only lines like ** and ** join to ** ** — four asterisks, which CommonMark reads as a thematic break — and the tab indent hid that from the escape that would otherwise neutralize it, so the join silently ended the list and changed what the document rendered to.
    The body is now escaped and reflows normally.

Full changelog: v0.1.5...v0.1.6