Skip to content

Add test cases for lazy continuation edge cases - #153

Open
karlb wants to merge 3 commits into
jgm:mainfrom
karlb:test-lazy-continuation
Open

karlb wants to merge 3 commits into
jgm:mainfrom
karlb:test-lazy-continuation

Conversation

@karlb

@karlb karlb commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

lists.test:168 and block_quote.test's lazy cases all put a plain word on the lazy line, and every item or quoted line they continue is a paragraph with content. That leaves the edges of the rule untested: a lazy line that opens a block of its own, an item with nothing to continue, a paragraph opened after a blank inside the item, and a quoted line that is not a paragraph.

lists.test:168 and block_quote.test's lazy cases all put a plain word
on the lazy line, and every item or quoted line they continue is a
paragraph with content. That leaves the edges of the rule untested:
a lazy line that opens a block of its own, an item with nothing to
continue, a paragraph opened after a blank inside the item, and a
quoted line that is not a paragraph.

All four pass on main.
Comment thread test/block_quote.test Outdated
Comment on lines +85 to +87
A quoted line that opens a block of its own leaves nothing for a
later line to continue:

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be clearer. The relevant point here is that the thematic break block is already closed by the time we get to lazy. There is no problem with a quoted line opening a block and then having a lazy continuation:

> > a
b

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I rephrased the description.

Comment thread test/lists.test Outdated
Comment on lines +206 to +212
```
-
next

-
next
.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should reconsider this case. After all, it violates the usual expectation that you need a blank line between a list and following paragraph.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. I dropped this case from the PR and created a spec issue instead: jgm/djot#413

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants