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: Inline HTML & IDs from Extra Markdown not working #11147

Closed
aybassiouny opened this issue Jan 16, 2019 · 2 comments
Closed

Markdown: Inline HTML & IDs from Extra Markdown not working #11147

aybassiouny opened this issue Jan 16, 2019 · 2 comments
Labels
Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". [Feature] Markdown [Focus] Blocks Issues related to the block editor, aka Gutenberg, and its extensions developed in Jetpack

Comments

@aybassiouny
Copy link

Steps to reproduce the issue

  1. Start a new jetpack site
  2. Activate Markdown
  3. Start a new post and add the following in a markdown block:
## Test inline html

<p> There should be no html tags </p>

## test anchors       {#header2}

There should be an an id for the above line, not extra markdown syntax.

  1. Result

What I expected

According to Jetpack's Markdown documentation, the flavor of MD used is Markdown Extra. However, both IDs and inline html should be supported, which steps above show is not the case.

What happened instead

Special syntax is ignored and rendered on the screen instead. As a result, I am completely blocked from adding in-page links on my blog.

Screenshots

image

@jeherve jeherve added [Feature] Markdown [Focus] Blocks Issues related to the block editor, aka Gutenberg, and its extensions developed in Jetpack labels Jan 16, 2019
@jeherve
Copy link
Member

jeherve commented Jan 16, 2019

Thanks for the feedback!

That's indeed a bit confusing. Jetpack's Markdown feature follows the Markdown Extra spec. The Markdown block, however, follows a different implementation that follows the CommonMark spec. CommonMark does not support manually set IDs as far as I can tell. You can check this thread to find out more:
https://talk.commonmark.org/t/anchors-in-markdown/247/32
This is also discussed here:
markdown-it/markdown-it#28

Adding raw HTML, however, is definitely something we could support in our block. I created an issue to track this in the wp-calypso repository, where we develop the block:
https://github.com/Automattic/wp-calypso/issues/30188

@bikedorkjon
Copy link

This came up in 2019865-zen

@matticbot matticbot added the Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". label May 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Customer Report Issues or PRs that were reported via Happiness. Previously known as "Happiness Request". [Feature] Markdown [Focus] Blocks Issues related to the block editor, aka Gutenberg, and its extensions developed in Jetpack
Projects
None yet
Development

No branches or pull requests

4 participants