release action, convert to library crate, bump version to 0.1.0
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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>;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
*/
|
||||
Reference in New Issue
Block a user