Fix escapes of highlighted code

pull/1/head
trivernis 5 years ago
parent 3b75ad10dc
commit 9e1d13bce5

2
Cargo.lock generated

@ -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)",

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

@ -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]
```

@ -199,7 +199,7 @@ impl ToHtml for CodeBlock {
"<div><code lang='{}'>{}</code></div>",
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"]

Loading…
Cancel
Save