Skip to content

Commit

Permalink
0.12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kivikakk committed Sep 2, 2021
1 parent bbb1342 commit fe60bc2
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "comrak"
version = "0.11.0"
version = "0.12.0"
authors = ["Ashe Connor <ashe@kivikakk.ee>"]
description = "A 100% CommonMark-compatible GitHub Flavored Markdown parser and formatter"
documentation = "https://docs.rs/comrak"
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ curl.exe -A "MS" https://webinstall.dev/comrak | powershell

``` console
$ comrak --help
comrak 0.11.0
comrak 0.12.0
Ashe Connor <ashe@kivikakk.ee>
A 100% CommonMark-compatible GitHub Flavored Markdown parser and formatter

Expand Down Expand Up @@ -73,6 +73,8 @@ OPTIONS:
--front-matter-delimiter <DELIMITER> Ignore front-matter that starts and ends with the given string
--header-ids <PREFIX> Use the Comrak header IDs extension, with the given ID prefix
-o, --output <FILE> Write output to FILE instead of stdout
--syntax-highlighting <THEME> Syntax highlighting for codefence blocks. Choose a theme or 'none' for
disabling. [default: base16-ocean.dark]
--width <WIDTH> Specify wrap width (0 = nowrap) [default: 0]

ARGS:
Expand Down Expand Up @@ -171,16 +173,16 @@ By default none are enabled; they are individually enabled with each parse by se

At the moment syntax highlighting of codefence blocks is the only feature that can be enhanced with plugins.

Create an implementation of the `SyntaxHighlighterAdapter` trait, and then provide an instance of such adapter to
`ComrakPlugins.render.codefence_syntax_highlighter`. For formatting a markdown document with plugins, use the
Create an implementation of the `SyntaxHighlighterAdapter` trait, and then provide an instance of such adapter to
`ComrakPlugins.render.codefence_syntax_highlighter`. For formatting a markdown document with plugins, use the
`markdown_to_html_with_plugins` function, which accepts your plugin as a parameter.

See the `syntax_highlighter.rs` and `syntect.rs` examples for more details.

#### Syntect

[`syntect`](https://github.com/trishume/syntect) is a syntax highlighting library for Rust. By default, `comrak` offers
a plugin for it. In order to utilize it, create an instance of `plugins::syntect::SyntectAdapter` and use it as your
[`syntect`](https://github.com/trishume/syntect) is a syntax highlighting library for Rust. By default, `comrak` offers
a plugin for it. In order to utilize it, create an instance of `plugins::syntect::SyntectAdapter` and use it as your
`ComrakPlugins` option.

## Related projects
Expand Down
5 changes: 5 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
### 0.12.0

* Add pluggable syntax highlighting, and default implementation with syntect.
(Daniel Simon, #194)

### 0.11.0

* Allow short URLs even with non-empty path. (#191, Bernard Teo)
Expand Down

0 comments on commit fe60bc2

Please sign in to comment.