Markdown attributes not working

I’m trying to get this to work at home, but it doesn’t do anything.

  • I added the config in markup.yaml
  • put the CSS in my custom.css
  • Added the example code of the first post in a test file

But nothing works.

When I inspect the HTML code, there is no class added.

I continue to search

PS : I use the render hook for the coded block already, can it play ?

Thanks

It sounds like your configuration is spread over several files in a configuration directory.

If that’s the case, your markup.yaml file should contain this:

[goldmark.parser.attribute]
block = true # default is false

Thank you always very quick to answer and I thank you for it

Here is my martkup.yaml

markup:
  #defaultMarkdownHandler: goldmark ## Utile si besoinde passer par l'ancien moteur markdown Blackfriday
  tableOfContents:
    endLevel: 5
    ordered: false
    startLevel: 2

  highlight:
    noClasses: false
    style: monokai


  goldmark:
    parser:
      attribute:
        block: true

    #renderer:
    #  unsafe: true

Thanks

So is it working now?

no not working

Can you share your repository?

yes i push because i’m a local

Please share your repository.

When you split a configuration key into its own file, the new file should not contain the configuration key. The filename itself is the configuration key.

So your markup.yaml file should like this:

tableOfContents:
  endLevel: 5
  ordered: false
  startLevel: 2
highlight:
  noClasses: false
  style: monokai
goldmark:
  parser:
    unsafe: true
    attribute:
      block: true

Also, the styling I provided is in Sass, but you copied this into a CSS file.

Ok thanks for explain,

I will look at this

Thank you in

Edit :slight_smile: @jmooring
Thanks Thanks Thnks it’s work.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.