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 editor problem #1481

Closed
coolemur opened this issue Jul 9, 2018 · 3 comments
Closed

Markdown editor problem #1481

coolemur opened this issue Jul 9, 2018 · 3 comments

Comments

@coolemur
Copy link

coolemur commented Jul 9, 2018

I'm having some trouble displaying simple lists in page content.

I'm trying to use:

* A
* B
# Heading
1. B
2. C

Result: this creates one list that contains heading and another list that is put into first list.

Expected: unordered list, heading, ordered list.

Steps to reproduce:

  1. Download grav+admin.
  2. Run grav+admin on local machine (I'm using MAMP).
  3. Edit main content at the top of the page using code I've provided above.
  4. Check generated html.

Can you, please, confirm this is a bug or give an alternative advice ?

Thank you!

@AmauryCarrade
Copy link

This is a Markdown issue rather than a grav-admin one.

I suggest you add empty lines around the heading, like so. Markdown uses blank lines to separate the text into paragraphs and other independent blocks. Without these, Parsedown understood your heading as in the previous block; that's why it was in the bullet list.

* A
* B

# Heading

1. B
2. C

@coolemur
Copy link
Author

@AmauryCarrade Tried it. Didn't work.

@OleVik
Copy link
Contributor

OleVik commented Jul 13, 2018

@AmauryCarrade's code is correct, as the initial code - without empty lines, renders as:

<ul>
<li>A</li>
<li>B
<h1>Heading</h1>
<ol>
<li>B</li>
<li>C</li>
</ol></li>
</ul>

But Amaury's renders as:

<ul>
<li>A</li>
<li>B</li>
</ul>
<h1>Heading</h1>
<ol>
<li>B</li>
<li>C</li>
</ol>

Tested with Parsedown, what Grav uses to parse Markdown, and with Grav v1.5.0-beta.1 + Admin v1.8.5. Make sure your cache is disabled for development, and cleared.

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

4 participants