Skip to content
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

Inconsistency about blanks wrt list tightness #685

Closed
eureton opened this issue Aug 9, 2021 · 4 comments
Closed

Inconsistency about blanks wrt list tightness #685

eureton opened this issue Aug 9, 2021 · 4 comments

Comments

@eureton
Copy link

eureton commented Aug 9, 2021

The definition of blank line doesn't clarify scope:

A line containing no characters, or a line containing only spaces (U+0020) or tabs (U+0009), is called a blank line.

In other words, it's not clear whether the line scope is the document or the surrounding block element. Consider the snippet below:

- 
  abc

The latter interpretation classifies the line as blank wheres the former doesn't.

Farther down, Example 278 complicates matters further because the prose assumes the latter interpretation:

[...] some list items that start with a blank line but are not empty

whereas dingus implements the former (i.e. produced list is marked tight).

Which of the two is correct?

@wooorm
Copy link
Contributor

wooorm commented Aug 9, 2021

But like, extending your reasoning for seeing blank lines as ambiguous here to some other language in the spec, such as for headings, would also make - # is this a heading? “ambiguous”.

I’m not sure what language change you propose, but I’d say the fact that containers include “lines” is adequately explained in the respective sections on those containers themselves: block quotes, list items.

@eureton
Copy link
Author

eureton commented Aug 9, 2021

@wooorm I have proposed no change.

My post concludes with a question. What gets corrected (spec text or dingus implementation) depends on the answer, which I don't have.

@wooorm
Copy link
Contributor

wooorm commented Aug 9, 2021

L1 in your example is not a blank line to the whole document. To the list item, it is a blank line.

I’m not seeing where the spec text and dingus are at odds with each other?

@eureton
Copy link
Author

eureton commented Aug 9, 2021

I see now where my confusion comes from. I was mistaking the scope implied by the tightness definition:

A list is loose if any of its constituent list items are separated by blank lines

This makes

- abc
- 
  xyz

indeed tight, because L2 is blank to the item, but not to the list.

@eureton eureton closed this as completed Aug 9, 2021
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

No branches or pull requests

2 participants