Repository navigation
End a quoted paragraph in a list item at a bare quote marker - #317
Merged
Merged
Conversation
Inside a list item or a definition, a quote line holding only `>` did not
close the quoted paragraph, so the next unindented line was taken as lazy
text and stayed in the item:
- > a
>
b
djot.js ends the list and makes `b` a paragraph after it. The syntax
description: the contents of a block quote "(minus initial `>`) are parsed
as block-level content", so a bare `>` is a blank line inside the quote,
and a "paragraph ends with a blank line or the end of the document". With
the paragraph closed, `b` is no lazy continuation. The item tracker now
remembers how many quote levels the open paragraph sits in and closes it on
a line with nothing after those markers.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #317 +/- ##
=========================================
Coverage 93.13% 93.13%
- Complexity 4757 4770 +13
=========================================
Files 118 118
Lines 12706 12721 +15
=========================================
+ Hits 11834 11848 +14
- Misses 872 873 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Inside a list item or a definition, a quote line holding only
>did not close the quoted paragraph, so the next unindented line was taken as lazy text and stayed in the item:djot.js ends the list and makes
ba paragraph after it. djot-php keptbin the item. The same happened in a definition (: t, blank,> a,>,b) and with nested quotes.The syntax description: the contents of a block quote "(minus initial
>) are parsed as block-level content", so a bare>is a blank line inside the quote, and a "paragraph ends with a blank line or the end of the document". Once the paragraph is closed,bcannot continue it lazily. The item tracker now remembers how many quote levels the open paragraph sits in and closes it on a line with nothing after those markers. A>after plain item text is still text, as before.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
9790d4don 852 after #316 and 849 with this change. None moved the other way. On the 1080 list item bodies from #316 nothing changed.The new tests keep
<p>inside a quote in a tight list item, where djot.js renders the text bare. That is the djot.js behavior that gives nested blocks the outer list's tightness, which this PR does not follow.