Merge pull request #19 from Trivernis/develop

Fix windows lineending
pull/20/head v0.33.2
Trivernis 4 years ago committed by GitHub
commit fd23a49e49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

2
Cargo.lock generated

@ -2315,7 +2315,7 @@ checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e"
[[package]]
name = "snekdown"
version = "0.33.1"
version = "0.33.2"
dependencies = [
"asciimath-rs",
"base64 0.12.3",

@ -1,6 +1,6 @@
[package]
name = "snekdown"
version = "0.33.1"
version = "0.33.2"
authors = ["trivernis <trivernis@protonmail.com>"]
edition = "2018"
license-file = "LICENSE"

@ -111,9 +111,7 @@ impl ToHtml for Document {
writer.write("<!DOCTYPE html>".to_string())?;
writer.write("<html lang=\"".to_string())?;
writer.write_attribute(metadata.language)?;
writer.write("\"><head ".to_string())?;
writer.write(path)?;
writer.write("/>".to_string())?;
writer.write("\"><head>".to_string())?;
writer.write("<meta charset=\"UTF-8\">".to_string())?;
if let Some(author) = metadata.author {

@ -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');
}

Loading…
Cancel
Save