Skip to content

v22.0.3

Choose a tag to compare

@Byron Byron released this 28 Sep 11:41
· 9 commits to main since this release
a14b105

The last bugfix release before the rewrite that will bring full conformance.

Bug Fixes

  • discard quote terminators when definitions end
    Ending a definition emits a newline outside its block quote. Discard
    the pending quote-ending line there so the next tight-list child cannot
    start an extra empty quote. Keep pending lines across item and list ends,
    which do not themselves write outside the quote.

    Cover direct and nested definitions, enclosing block quotes, and resumed
    serialization.

  • preserve paragraph spacing in loose definitions
    Once inline events consume the title's pending newline, a code term no
    longer leaves a blank line before its definition. Defer the definition
    marker until its first child so a paragraph can request the required
    blank line before the marker. Flush a pending marker when finalizing.

    Cover tight and loose terms, multiple definitions, nested containers,
    empty definitions, and serialization resumed at every event boundary.
    Update the definition-list snapshot for the added paragraph spacing.

  • account for HTML newlines in tight list items
    HTML events already emit their trailing newline. Count that line break
    when limiting separators in tight items so following inline content does
    not make the list loose. Keep normal paragraph spacing and remember the
    newline across resumed serialization.

  • write pending newlines before every inline event
    For Text and InlineHtml events, we'd write out pending newlines, but for
    Code, InlineMath, DisplayMath, FootnoteReference, and TaskListMarker,
    we did not. In a tight list item, inline content can directly follow the
    end of a block, so the input:

    * # heading
      `code`
    

    would roundtrip as:

    * # heading`code`
    
  • avoid instances of tight lists roundtripping to loose
    This is a somewhat subtle commit because we have to handle tight list block
    quotes carefully, such as:

    * item
      * a
        > q
        >
      text

    Most of the commit is about dealing with this case.

  • in tight list items, start thematic breaks on their own line
    In a tight list item, a thematic break can directly follow the item's text.
    Nothing before the break asks for a newline in that case, so the input:

    * item
      ***
    

    would roundtrip as:

    * item---
    

    which parses as a single line of text.

    Start the break on a new line. A --- line directly under a line of text is a
    setext heading underline, which would turn item into a heading, so write the
    break as *** in this case. Thematic breaks everywhere else are still written
    as ---.

  • in tight list items, start blocks on a new line after inline content

Commit Statistics

  • 8 commits contributed to the release.
  • 7 commits were understood as conventional.
  • 0 issues like '(#ID)' were seen in commit messages

Commit Details

view details
  • Uncategorized
    • Merge pull request #112 from sunshowers/more-fixes (299ed9b)
    • Discard quote terminators when definitions end (9905181)
    • Preserve paragraph spacing in loose definitions (a7d1f06)
    • Account for HTML newlines in tight list items (afe8ac6)
    • Write pending newlines before every inline event (64dca63)
    • Avoid instances of tight lists roundtripping to loose (2ab730f)
    • In tight list items, start thematic breaks on their own line (9438289)
    • In tight list items, start blocks on a new line after inline content (fcc8237)