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

Blockquote followed by an heading #191

Open
tivie opened this issue Aug 23, 2015 · 1 comment
Open

Blockquote followed by an heading #191

tivie opened this issue Aug 23, 2015 · 1 comment
Assignees
Labels

Comments

@tivie
Copy link
Member

tivie commented Aug 23, 2015

So, it came to my attention that this:

> a blockquote
# followed by an heading

gets parsed into something like:

<blockquote>
  <p>a blockquote</p>
</blockquote>
<h1>followed by an heading</h1>

Now, the spec states that you can be lazy and only put the > before the first line of a hard-wrapped paragraph. So the correct output should be:

<blockquote>
  <p>a blockquote</p>
  <h1>followed by an heading</h1>
</blockquote>

In fact, github behaves like this (so does markdown.pl)

a blockquote

followed by an heading

But other noteworthy implementations behave like showdown, such as:

  • stackoverflow
  • commonmark
  • cheapskate
  • markdown-it
  • pandoc (strict)
  • PHP Markdown (and PHP MD Extra)
  • Maruku
  • markdown-it

So I'm a bit divided as if we should "fix it" or leave it as it is...

@tivie
Copy link
Member Author

tivie commented May 9, 2022

Github behavior changed to match showdown original behavior.

This means:

> a blockquote
# followed by an heading

is parsed as

<blockquote>
  <p>a blockquote</p>
</blockquote>
<h1>followed by an heading</h1>

foo

bar

So this change will be reverted

tivie added a commit that referenced this issue May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant