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 block: Parsing issues and inconsistencies #11881

Open
1 of 5 tasks
tyxla opened this issue Oct 12, 2018 · 10 comments
Open
1 of 5 tasks

Markdown block: Parsing issues and inconsistencies #11881

tyxla opened this issue Oct 12, 2018 · 10 comments
Labels
Epic Formerly "Primary Issue", or "Master Issue" [Feature] Markdown [Focus] Blocks Issues related to the block editor, aka Gutenberg, and its extensions developed in Jetpack Good For Community Hacktoberfest Support open source and earn a limited edition T-shirt! https://hacktoberfest.digitalocean.com/ [Pri] Low [Type] Bug When a feature is broken and / or not performing as intended

Comments

@tyxla
Copy link
Member

tyxla commented Oct 12, 2018

In testing how elements are recognized and parsed in our Jetpack Markdown block for Gutenberg, we've discovered several issues and inconsistencies so far.

This is a master issue for all of them, feel free to add any others that you find.

@tyxla
Copy link
Member Author

tyxla commented Oct 17, 2018

FWIW, some of those are already fixable:

  • Empty lines omitted - fixable if we make breaks: true for the parser.
  • Footnotes / reference links - there's a plugin for adding support

Anyway, fixing them is not so straightforward, because we'd also need to account for them in our WP.com implementation of Markdown.

@KnBrckr
Copy link

KnBrckr commented Jan 25, 2019

I was asked in https://wordpress.org/support/topic/definition-lists-not-working-in-markdown-gutenberg-block/#post-11127209 to add some notes here.

Also missing from the above list are definition lists and abbreviations. These are both part of Markdown Extra, which is what the Jetpack Markdown module is documented to use. WP.com also claims support for these features on its Markdown support page

There are markdown-it plugins available for the missing features:

@scruffian scruffian transferred this issue from Automattic/wp-calypso Apr 3, 2019
@scruffian scruffian added [Pri] Low [Type] Bug When a feature is broken and / or not performing as intended [Focus] Blocks Issues related to the block editor, aka Gutenberg, and its extensions developed in Jetpack labels Apr 3, 2019
@jeherve jeherve added [Feature] Markdown Epic Formerly "Primary Issue", or "Master Issue" labels Apr 4, 2019
@KokkieH
Copy link

KokkieH commented Dec 15, 2020

@DBJDBJ
Copy link

DBJDBJ commented Dec 15, 2020

Guys, what is not being said here? 2+ years for NOT resolving something so important to many users. There must be a story behind this.

@jeherve
Copy link
Member

jeherve commented Dec 15, 2020

@DBJDBJ We're not currently working on the Markdown block, but when we do come back and iterate on that block, we'll definitely be tackling some of the items on the list above.

Until then, we've marked this issue as "Good For Community". That means that we'll be happy to review any improvements and bug fixes suggested by community members like you.

@DBJDBJ
Copy link

DBJDBJ commented Dec 15, 2020

@jeherve What is good for me I have now done: uninstalled Jet Pack. Actually I would very much like to move to HUGO but dbj.org is 500+ posts. It will be done.

@mxro
Copy link

mxro commented Apr 30, 2022

Any chance on getting proper syntax highlighting for code blocks? As far as I can see, syntax highlighting still does not work even when specifying the correct language. All code in Markdown blocks is just rendered as plain text.

image

@jenxi
Copy link

jenxi commented Oct 16, 2022

Any chances of adding Markdown footnotes support in Markdown blocks?

jeherve added a commit that referenced this issue Apr 18, 2023
Fixes #11849

Also see #18035 and #11881.

This involves bringing in a new dependency to the Jetpack plugin:

- https://github.com/markdown-it/markdown-it-footnote
- MIT License
@sophiegyo
Copy link

We had a question from someone who would like to create page anchors in Markdown:
https://wordpress.com/forums/topic/markdown-and-linkable-section-headers/

They referenced this .org style guide:
https://make.wordpress.org/docs/style-guide/linking/heading-targets/

I learned that the Markdown block uses CommonMark spec but this doesn't appear to allow page anchors, nor does it seem that the .org method of page anchors works in the Markdown block. I understand work's been done on the footnotes in the block; would it be viable to extend this to regular page anchors? (Or of course if there's something I'm missing about how to make those work, I'll gladly learn!)

@jeherve
Copy link
Member

jeherve commented Jun 7, 2023

this doesn't appear to allow page anchors

That's correct. Header anchors are not supported at the moment. You can read more about it in this discussion: this doesn't appear to allow page anchors

They referenced this .org style guide:
make.wordpress.org/docs/style-guide/linking/heading-targets

This is about content published on make.wordpress.org, so it's a bit different. Instead, I would recommend using the option provided in the Heading block to add anchors to headings, like so:

Screenshot 2023-06-07 at 14 05 57

That requires using a mix of Markdown blocks and heading blocks, which isn't ideal, but that's one way to work around the problem today.

@jeherve jeherve added the Hacktoberfest Support open source and earn a limited edition T-shirt! https://hacktoberfest.digitalocean.com/ label Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Epic Formerly "Primary Issue", or "Master Issue" [Feature] Markdown [Focus] Blocks Issues related to the block editor, aka Gutenberg, and its extensions developed in Jetpack Good For Community Hacktoberfest Support open source and earn a limited edition T-shirt! https://hacktoberfest.digitalocean.com/ [Pri] Low [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

No branches or pull requests

9 participants