-
I am using Bulma where that uses several classes. Basically instead if In order to generate the page I have this code: let content = markdown2html(&content)
.replace("<h1>", "<h1 class=\"title\">")
.replace("<h2>", "<h2 class=\"title is-4\">")
.replace("<h3>", "<h3 class=\"title is-5\">");
fn markdown2html(content: &str) -> String {
markdown::to_html_with_options(
content,
&markdown::Options {
compile: markdown::CompileOptions {
allow_dangerous_html: true,
..markdown::CompileOptions::default()
},
..markdown::Options::gfm()
},
)
.unwrap()
} All those calls to How can I convince the crate to use my tags instead of the default ones? |
Beta Was this translation helpful? Give feedback.
Answered by
wooorm
Feb 6, 2024
Replies: 1 comment 2 replies
-
You can’t and you don’t need to. Bulma, next to supporting all those classes, also supports semantic html: |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
szabgab
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can’t and you don’t need to. Bulma, next to supporting all those classes, also supports semantic html:
https://bulma.io/documentation/elements/content/