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

<main> not processed with parse_block_html #334

Closed
jmlacroix opened this issue May 4, 2016 · 2 comments
Closed

<main> not processed with parse_block_html #334

jmlacroix opened this issue May 4, 2016 · 2 comments
Assignees
Labels

Comments

@jmlacroix
Copy link

Hi!

I was messing around with middleman and kramdown and I stumbled upon a weird behavior: it seems like kramdown won't parse content inside <main> html blocks.

Here's the markdown I'm trying to process:

title
=====

{::options parse_block_html="true" /}

<main class="hi">

### level 3

text [link](http://google.com)

</main>

Here's it's output using kramdown 1.11.1:

<h1 id="title">title</h1>

<main class="hi">

### level 3

text [link](http://google.com)

</main>

If I change the <main> tag to a <div>, it works:

title
=====

{::options parse_block_html="true" /}

<div class="hi">

### level 3

text [link](http://google.com)

</div>

Output:

$ kramdown test.html.md
<h1 id="title">title</h1>

<div class="hi">

  <h3 id="level-3">level 3</h3>

  <p>text <a href="http://google.com">link</a></p>

</div>

Is there anything else I can provide you with ?

Thanks for your help.

@gettalong gettalong self-assigned this May 5, 2016
@gettalong
Copy link
Owner

Thanks for the report!

The reason is that <main> is not recognized as a valid HTML element, yet, so block parsing defaults to raw. You can force block parsing in the meantime by using <main markdown="block">.

@gettalong gettalong added the bug label May 5, 2016
@gettalong
Copy link
Owner

The fix for this will be in the next release.

gettalong added a commit that referenced this issue Aug 7, 2016
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

2 participants