added html generation
All checks were successful
Test the running changes / Test (push) Successful in 40s

This commit is contained in:
2025-12-15 01:19:23 +02:00
parent 30369cfdd3
commit 17185d4420
13 changed files with 392 additions and 133 deletions

View File

@@ -1,3 +1,32 @@
pub mod inline;
pub mod block;
use std::fmt::{Debug, Display};
pub mod block;
pub mod inline;
#[derive(Debug)]
pub struct MarkdownParseError {
kind: nom::error::ErrorKind,
message: String,
}
impl Display for MarkdownParseError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{:?}, {}", self.kind, self.message)
}
}
impl nom::error::ParseError<&str> for MarkdownParseError {
fn from_error_kind(input: &str, kind: nom::error::ErrorKind) -> Self {
Self {
kind,
message: format!("at: {}", input),
}
}
fn append(input: &str, kind: nom::error::ErrorKind, other: Self) -> Self {
Self {
kind,
message: format!("{}\nat: {}", other, input),
}
}
}