You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Combination of blockquote and list inconsistency #421
Basic case. If a string of lines Ls constitute a sequence of blocks Bs, then the result of prepending a block quote marker to the beginning of each line in Ls is a block quote containing Bs.
So, the question to ask yourself is: could you get
>1. > asdf
> > sdfg
by appending a block quote marker to the beginning of each line in
1. > asdf
> sdfg
And the answer is "no," though perhaps some changes to the spec could clarify this. You can get the first line
>1. > asdf
by adding a block quote marker to the beginning of the line, but you can't get the second line, because a block quote marker is either a > that is NOT followed by a space, or a > + SPACE. Thus, in
> > sdfg
the block quote marker is > (> + SPACE), and the content inside it is only indented two spaces, not three.
A parser I'm producing based off the specification produces gives the same result.
That to say, the current behaviour does honour the specification IMO
That said, given that understanding this difference requires understanding that the blockquote marker actually includes a space – I think this result is horribly unintuitive.
Perhaps there could be some discussion on requiring that subsequent blockquote lines opportunistically utilise the same marker (either > or >•) as the most recent previously valid "item", much like lists do.
Edit: Upon reconsideration the specification is ambiguous, I've made assumptions in my implementation not given in the specification
Perhaps there could be some discussion on requiring that subsequent
blockquote lines opportunistically utilise the same marker (either > or
>•) as the most recent previously valid "item", much like lists do.
I think this is a good idea to explore. It would allow
blockquotes like
this
one
to work as before. And I would not anticipate much
breakage in existing documents if a change like this were
made.
Although this method wouldn't be entirely consistent with the approach I gave here I think it should probably work almost identically – seeing as blocks like lists are allowed to casually recede in their indentation so
> 1. a>2. b
Would be interpreted the same as
> 1. a> 2. b
and the same as
>1. a>2. b
The only possible (writer) ambiguity I can see with this opportunistic approach is that is:
Activity
jgm commentedon Aug 11, 2016
Spec says:
So, the question to ask yourself is: could you get
by appending a block quote marker to the beginning of each line in
And the answer is "no," though perhaps some changes to the spec could clarify this. You can get the first line
by adding a block quote marker to the beginning of the line, but you can't get the second line, because a block quote marker is either a
>that is NOT followed by a space, or a>+ SPACE. Thus, inthe block quote marker is
>(>+ SPACE), and the content inside it is only indented two spaces, not three.aidantwoods commentedon Apr 12, 2017
A parser I'm producing based off the specification produces gives the same result.That to say, the current behaviour does honour the specification IMOThat said, given that understanding this difference requires understanding that the blockquote marker actually includes a space – I think this result is horribly unintuitive.Perhaps there could be some discussion on requiring that subsequent blockquote lines opportunistically utilise the same marker (either>or>•) as the most recent previously valid "item", much like lists do.Edit: Upon reconsideration the specification is ambiguous, I've made assumptions in my implementation not given in the specification
jgm commentedon Apr 12, 2017
aidantwoods commentedon Apr 12, 2017
Although this method wouldn't be entirely consistent with the approach I gave here I think it should probably work almost identically – seeing as blocks like lists are allowed to casually recede in their indentation so
Would be interpreted the same as
and the same as
The only possible (writer) ambiguity I can see with this opportunistic approach is that is:
(minimal marker)
or
(opportunistic)