diff --git a/Cargo.lock b/Cargo.lock index 27b82f7..496051a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2315,7 +2315,7 @@ checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" [[package]] name = "snekdown" -version = "0.33.1" +version = "0.33.2" dependencies = [ "asciimath-rs", "base64 0.12.3", diff --git a/Cargo.toml b/Cargo.toml index 2621552..aecb5dc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snekdown" -version = "0.33.1" +version = "0.33.2" authors = ["trivernis "] edition = "2018" license-file = "LICENSE" diff --git a/src/format/html/to_html.rs b/src/format/html/to_html.rs index 0ec6dbb..d99e29d 100644 --- a/src/format/html/to_html.rs +++ b/src/format/html/to_html.rs @@ -111,9 +111,7 @@ impl ToHtml for Document { writer.write("".to_string())?; writer.write("".to_string())?; + writer.write("\">".to_string())?; writer.write("".to_string())?; if let Some(author) = metadata.author { diff --git a/src/parser/mod.rs b/src/parser/mod.rs index 39ee5ad..6d344de 100644 --- a/src/parser/mod.rs +++ b/src/parser/mod.rs @@ -101,6 +101,7 @@ impl Parser { pub fn with_defaults(options: ParserOptions) -> Self { let text = if let Some(path) = &options.path { let mut text = read_to_string(&path).unwrap(); + text = text.replace("\r\n", "\n"); if text.chars().last() != Some('\n') { text.push('\n'); }