Skip to content

Close a marker-line sublist's paragraph at a block line - #319

Merged
dereuromark merged 1 commit into
masterfrom
fix/item-block-at-inner-marker-column
Oct 16, 2026
Merged

dereuromark merged 1 commit into
masterfrom
fix/item-block-at-inner-marker-column

Conversation

@dereuromark

Copy link
Copy Markdown
Contributor

An item whose marker line opens another list (- - para, - 1. para, - : t) kept the inner paragraph open when the next line opened a block at or left of the inner marker's column. The unindented line after that was taken as lazy text:

- - para
  ```
tail

djot.js closes the inner item at the fence, opens the code block in the outer item and ends the list at tail. djot-php put tail in the code block. The same happened with a thematic break, a table or a reference definition in that position.

The syntax description: a list item takes "one or more lines, indented relative to the list marker", and only an open paragraph takes a lazy line ("Because a paragraph can never be interrupted by another block-level element"). The item tracker already closed a note's paragraph this way (#315); it now does the same for a list opened on the marker line. Plain text at that column still continues the inner paragraph (- - a, b).

Documents with this shape render differently, so this is labeled bc-breaking.

Measured against djot.js

On the 4853 generated block-family inputs, djot-php differed from djot.js 9790d4d on 799 after #318 and 788 with this change. None moved the other way. On the 1080 list item bodies from #316 nothing changed.

An item whose marker line opens another list (`- - para`, `- 1. para`,
`- : t`) kept the inner paragraph open when the next line opened a block
at or left of the inner marker's column. The unindented line after it was
then taken as lazy text:

    - - para
      ```
    tail

djot.js closes the inner item at the code fence, opens the code block in
the outer item and ends the list at `tail`. djot-php put `tail` in the
code block. The syntax description: a list item takes "one or more lines,
indented relative to the list marker", and only an open paragraph takes a
lazy line ("Because a paragraph can never be interrupted by another
block-level element"). The item tracker already closed a note's paragraph
this way; it now does the same for a list opened on the marker line.
@dereuromark dereuromark added bug Something isn't working bc-breaking labels Oct 16, 2026
@dereuromark
dereuromark merged commit 87ad03f into master Oct 16, 2026
4 checks passed
@dereuromark
dereuromark deleted the fix/item-block-at-inner-marker-column branch October 16, 2026 15:11
@codecov

codecov Bot commented Oct 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.14%. Comparing base (a47bf23) to head (b242923).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #319   +/-   ##
=========================================
  Coverage     93.14%   93.14%           
- Complexity     4775     4776    +1     
=========================================
  Files           118      118           
  Lines         12732    12733    +1     
=========================================
+ Hits          11859    11860    +1     
  Misses          873      873           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

bc-breaking bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant