-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rendered markdown lists contain paragraphs 🤔 #414
Comments
I agree, at least in cmark there's no p in lists. |
According to the observed CommonMark behaviour the following markup will not render paragraphs: - item 1
- item 2
- item 3 while the following markup will: - paragraph 1
- paragraph 2
- paragraph 3 This is an appropriate and logical behaviour. In the second case, you can have multiple paragraphs within a list separated by a blank line or a nested list. |
Ooooh, thank you so much @viktor-yakubiv I didn't know CommonMark behaved differently in that case. (But nuemark creates paragraphs in both cases. I don't know if it's better if it does it in both cases or not, but at least you can style all lists the same...) |
It is not true. Let me provide a simple HTML+CSS example to that proves it: <style>
li { margin-block: 0.75rem }
p { margin-block: 1rem }
</style>
<ol>
<li>A list
<li>with short text items
<li>and therefore
<li>condensed spacing
</ol>
<ol>
<li>
<p>A list with long items,</p>
<ul>
<li>sublists,
</ul>
<p>multiple paragraphs,</p>
<li><p>and therefore extended spacing.</p>
</ol> Note a few things:
This is what Markdown (CommonMark) does by common sense and by specification. If you care about UX (DX in this case), I would like to paraphrase the Jakob's Law:
|
It's right behavior?
The text was updated successfully, but these errors were encountered: