Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Themes & Styling

Markdown failing

Started by David Douglass 3 years ago · 1 replies · 398 views
3 years ago

I've been having such a hard time with markdown, I've had to substitute lots of things for html tags. This one article I've been working on today has taken me about 2 hrs, changing out tags just so it will look right and be easy to read. But markdown has been a real pain in the backside! Anyone else been experiencing this? I read somewhere that there is a js file that will resolve this issue.

I don't know what causes it, but it seems to have something to do with mixing markdown with html tags. Any workarounds for this?

3 years ago

@dpdoug, Without examples of Markdown and their processed result, it's hard to tell...

Anyway... The first know issue that comes to mind wrt Markdown and HTML tags is that Markdown will not be parsed inside block-level HTML elements, like <div>. See Markdown specs:

Note that Markdown formatting syntax is not processed within block-level HTML tags. E.g., you can’t use Markdown-style *emphasis* inside an HTML block.

I believe adding attribute markdown="1" to the HTML tag should solve the issue. Never tested it on Grav though.

According Grav's docs on Markdown:

Grav ships with built-in support for Markdown and Markdown Extra. You must enable Markdown Extra in your system.yaml configuration file.

Suggested topics

Topic Participants Replies Views Activity
Themes & Styling · by Pedro M, 2 months ago
4 193 2 months ago
Themes & Styling · by Ian, 2 months ago
3 90 2 months ago
Themes & Styling · by Norbert, 2 years ago
11 449 3 months ago
Themes & Styling · by Lukáš Findeis, 3 months ago
0 44 3 months ago
Themes & Styling · by Sebadamus, 4 months ago
5 123 3 months ago