release action, convert to library crate, bump version to 0.1.0
Some checks failed
Test the running changes / Test (push) Successful in 35s
Test the running changes / Test (pull_request) Failing after 2s

This commit is contained in:
2025-12-22 21:45:28 +02:00
parent 17185d4420
commit 852eddfebf
9 changed files with 36 additions and 139 deletions

View File

@@ -5,8 +5,8 @@ use super::ToHtml;
impl ToHtml for Vec<Block> {
fn to_html(&self) -> String {
let mut html = String::new();
for block in self.iter() {
html.push_str(&block.to_html())
for block in self {
html.push_str(&block.to_html());
}
html
}

View File

@@ -5,8 +5,8 @@ use super::ToHtml;
impl ToHtml for Vec<Inline> {
fn to_html(&self) -> String {
let mut html = String::new();
for inline in self.iter() {
html.push_str(&inline.to_html())
for inline in self {
html.push_str(&inline.to_html());
}
html
}

View File

@@ -44,6 +44,8 @@ pub trait ToHtml {
}
pub trait TryToHtml {
/// # Errors
/// Could fail when reading file contents is unsuccessful or generation is unsuccessful.
fn try_to_html(&self) -> Result<String, GenerationError>;
}

View File

@@ -1,10 +1,8 @@
use crate::generator::TryToHtml;
use std::path::PathBuf;
mod ast;
mod generator;
mod parser;
pub mod generator;
pub mod parser;
/*
fn main() {
let infile = PathBuf::from("test.md");
@@ -12,3 +10,4 @@ fn main() {
println!("{}", html);
}
*/