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

Markdown support mulit blockquotes #4496

Closed

Conversation

icyleaf
Copy link
Contributor

@icyleaf icyleaf commented Jun 2, 2017

fix broken blockquote style with multi blockquote:

> This spawns
> multiple
> lines
> text

before:

<blockquote>This spawns\n> multiple\n> lines\n> text</blockquote>

after:

<blockquote>This spawns multiple lines text</blockquote>

@asterite
Copy link
Member

asterite commented Jun 2, 2017

I don't think the change is correct. In Dingus I can see the newlines are preserved, and this happens everywhere in Markdown. The current behavior is fine.

What does this fix for you? Is it rendered wrong somewhere?

@RX14
Copy link
Contributor

RX14 commented Jun 2, 2017

@asterite The newlines are left in the generated HTML but by default HTML doesn't respect newlines. So this change is incorrect in terms of generated HTML but correct in visual output (but only in the typical case) I think.

@icyleaf
Copy link
Contributor Author

icyleaf commented Jun 2, 2017

If use Dingus test, this code is broken style:

> Hello


> World

In crystal:

<blockquote>Hello</blockquote>\n\n<blockquote>World</blockquote>

but in Dingus:

<blockquote>
  <p>Hello</p>

<p>World</p>
</blockquote>

@asterite
Copy link
Member

asterite commented Jun 2, 2017

Hm, I'm not sure Dingus is right about that last example. In GitHub I see they generate two blockquotes.

I guess we should implement some standard markdown and use an external spec, but there seems to be many standards. I think it would be best to move Markdown inside the Crystal namespace and let it be private and only be used in the doc generation: markdown can be provided by shards.

@icyleaf
Copy link
Contributor Author

icyleaf commented Jun 2, 2017

Why not use CommonMark as the default standard spec? For now, it is a tool for write with most of users or developers. I think it is better than current version. But move it out is also a solution. 😃

@RX14
Copy link
Contributor

RX14 commented Jun 2, 2017

The commonmark spec is pretty comprehensive regarding quotes.

Ideally we would extract all the test cases from commonmark and make that our test suite.

Edit: looks like the commonmark repo has a tool which extracts test cases from the spec.

@asterite
Copy link
Member

asterite commented Jun 2, 2017

Sure, using commonmark in the std is also another very good option. That way we can have specs that match a better spec than the one in the official markdown page.

@icyleaf
Copy link
Contributor Author

icyleaf commented Jul 19, 2017

close for now

@icyleaf icyleaf closed this Jul 19, 2017
@icyleaf icyleaf deleted the markdown-support-mulit-blockquotes branch July 6, 2018 08:07
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

Successfully merging this pull request may close these issues.

None yet

3 participants