Skip to content

Commit 8e27297

Browse files
committed
Add syntax highlighting to markdown rendering
The feature tries to work as much as possible like GitHub's rendering. Syntax highlighting is done with Sublime syntax files using syntect. Also made some changes to the config used with the HTML sanitizer to be more flexible with the allowed tags & attributes.
1 parent 425439e commit 8e27297

File tree

4 files changed

+300
-9
lines changed

4 files changed

+300
-9
lines changed

Cargo.lock

Lines changed: 133 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ clippy = { version = "=0.0.142", optional = true }
5252
chrono = "0.4.0"
5353
pulldown-cmark = { version = "0.0.15", default-features = false }
5454
ammonia = "0.5.0"
55+
syntect = "1.7.1"
5556

5657
conduit = "0.8"
5758
conduit-conditional-get = "0.8"

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ extern crate rand;
3737
extern crate s3;
3838
extern crate semver;
3939
extern crate serde;
40+
extern crate syntect;
4041
extern crate time;
4142
extern crate toml;
4243
extern crate url;

0 commit comments

Comments
 (0)