strong bold medium and heading tag handling

This commit is contained in:
2024-09-20 10:44:59 +02:00
parent 6650366e60
commit f3c4df4458
8 changed files with 17 additions and 25 deletions

View File

@ -55,7 +55,6 @@ async fn main() {
// - fotos
// TODO Colors
// Text slate, and gray should be somehow customised
// STRONG bold-medium
// TODO print css and other 404 css linked in base.html
// TODO go live pipeline
// TODO after release

View File

@ -177,12 +177,9 @@ pub fn parse_html(markdown: &str, generate_images: bool) -> String {
});
Event::Html(
formatdoc!(
r##"
<a name="{heading_id}" class="anchor" href="#{heading_id}">
<span class="header-link"></span>
</a>
r##"id="{heading_id}">
{text}
"##
"##
)
.into(),
)
@ -197,7 +194,7 @@ pub fn parse_html(markdown: &str, generate_images: bool) -> String {
}) => {
let id_str = id.map(|id| id.to_string());
text_kind = TextKind::Heading(id_str);
Event::Html(format!("<{level}>").into())
Event::Html(format!("<{level} ").into())
}
Event::Start(_) => event,
Event::End(TagEnd::Image) => Event::Html("</figcaption></figure>".into()),