added html generation
All checks were successful
Test the running changes / Test (push) Successful in 40s
All checks were successful
Test the running changes / Test (push) Successful in 40s
This commit is contained in:
@@ -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),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user