Closed mayel closed 9 months ago
Thanks for this much-needed library :)
Thanks!
I was wondering how to use that option
There you go:
MDEx.to_html("# README", extension: [header_ids: "user-content-"]) |> IO.puts()
#=> <h1><a href="#readme" aria-hidden="true" class="anchor" id="user-content-readme"></a>README</h1>
Manipulating the content of each node will be possible with #9 - that's something I'm still working and will be released soon.
@leandrocp thanks! Seems the title is already turned into a slug by default :)
Thanks for this much-needed library :)
I was wondering how to use that option: https://docs.rs/comrak/latest/comrak/struct.ExtensionOptions.html#structfield.header_ids
Maybe something like
header_ids: fn text -> slug(text) end
?