• Running WordPress 5.0.3 w/Jetpack 6.9

    I’m working with the markdown Gutenberg block provided by Jetpack. Most features work, however the one that I’m struggling with is definition lists, a part of Markdown Extra.

    What I’m seeing is this:

    concept
    : definition
    
    concept2
    : another definition

    is being turned into

    <p>concept
    : definition</p>
    <p>concept2
    : another definition</p>

    It should be translated into html using <dl> tag.

    It seems that a few of the features in Markdown Extra are not available in the Gutenberg block. Abbreviations and Footnotes also do not work for me. Tables do work so the Jetpack Markdown Gutenberg block implementation seems to be incomplete in some way if it is meant to have all elements of Markdown Extra as currently implied in the docs.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor James Huff

    (@macmanx)

    Interesting, this appears to be because the Markdown block supports CommonMark, not Markdown Extra: https://github.com/Automattic/jetpack/issues/11147#issuecomment-454750379

    I’m not sure _why_ though, I have asked our developers for further details.

    Thread Starter Ken Brucker

    (@draca)

    From my small bit of sleuthing, it appears that the Markdown block is using https://github.com/markdown-it/markdown-it for the JS support. Looks like implementation may only be using the base library and none of the plugins that would be needed to gain parity with what’s provided in Markdown Extra used in the PHP implementation.

    markdown-it includes table support in the base implementation while definition lists, abbreviations and footnotes are all available with additional plugin code.

    Plugin Contributor James Huff

    (@macmanx)

    Yep, you’re correct! It sounds like we needed to switch to an implementation that worked in JavaScript, since the new editor is entirely JavaScript.

    We’ll get to work on some documentation specific for the Markdown Block, but for now, would you please let us know which npm modules you’re thinking of to bring this more in parity with Markdown Extra in a comment under https://github.com/Automattic/wp-calypso/issues/27817 ? (Jetpack and Calypso, aka WordPress.com’s UI, share block functionality)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Definition Lists not working in Markdown Gutenberg block’ is closed to new replies.