diff --git a/Cargo.lock b/Cargo.lock index 30ee343..c6f9682 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -444,7 +444,7 @@ dependencies = [ [[package]] name = "snekdown" -version = "0.2.1" +version = "0.2.2" dependencies = [ "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "htmlescape 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index 401a4e8..ff3b3d6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snekdown" -version = "0.2.1" +version = "0.2.2" authors = ["trivernis "] edition = "2018" license-file = "LICENSE" diff --git a/README.md b/README.md index 3fbeeee..69c44aa 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ ARGS: ### Images -``` +```md Simple Syntax !(url) @@ -39,9 +39,10 @@ Extended syntax with metadata and no description !(url)[metadata] ``` + ### Quotes -``` +```md Simple (default) Syntax > This is a quote @@ -53,16 +54,22 @@ Quote with metadata (e.g. Author) [Trivernis - 2020]> This is a quote with metadata ``` + ### Imports Imports can be used to import a different document to be attached to the main document. Imports are parsed via multithreading. +```md +<[path] +``` + + ### Tables Tables MUST start with a pipe character `|` -``` +```md Standalone header: | header | header | header @@ -71,7 +78,3 @@ Header with rows |--------|--------|------- | row | row | row ``` - -``` -<[path] -``` \ No newline at end of file diff --git a/src/format/html.rs b/src/format/html.rs index 288a2d9..862e96b 100644 --- a/src/format/html.rs +++ b/src/format/html.rs @@ -199,7 +199,7 @@ impl ToHtml for CodeBlock { "
{}
", encode_attribute(self.language.clone().as_str()), highlighted_html_for_string( - encode_minimal(self.code.as_str()).as_str(), + self.code.as_str(), &ps, syntax, &ts.themes["InspiredGitHub"]