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

Example 73 clarification #624

Closed
darianmiller opened this issue Dec 5, 2019 · 2 comments
Closed

Example 73 clarification #624

darianmiller opened this issue Dec 5, 2019 · 2 comments

Comments

@darianmiller
Copy link

Foo
bar

baz

The problem is discussed and it is mentioned that the most natural / powerful option is to allow multiline heading. But this input doesn't currently output multi-line headings **by default ** It does allow multi-line headings if you have hard line break settings enabled and there is a hard break between Foo and bar.

Technically it's correct as worded, but it's a little misleading as when you click the "Try It" button, you do not get multi-line headings

Source: https://spec.commonmark.org/0.29/
"Compatibility note: Most existing Markdown implementations do not allow the text of setext headings to span multiple lines. But there is no consensus about how to interpret

Foo
bar

baz
One can find four different interpretations:

paragraph “Foo”, heading “bar”, paragraph “baz”
paragraph “Foo bar”, thematic break, paragraph “baz”
paragraph “Foo bar — baz”
heading “Foo bar”, paragraph “baz”
We find interpretation 4 most natural, and interpretation 4 increases the expressive power of CommonMark, by allowing multiline headings.

@jgm
Copy link
Member

jgm commented Dec 5, 2019

I'm not sure I understand. Example 73 is

Foo

bar
---
baz

This is not supposed to yield a multiline heading, because of the blank line.
And it doesn't. All is well.
Example 65 is the one illustrating a multiline heading.

@darianmiller
Copy link
Author

Try example #73 and remove the extra line between Foo and bar and Foo will not be included in the heading, only bar....

However, as I try it again while typing this response... it works as expected. I could swear I hit "Try It" on #73 and hit delete once after the Foo line and Foo was not in the header but now I cannot replicate it. Sorry!

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