Skip to content

Commit

Permalink
0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kivikakk committed Sep 10, 2018
1 parent 695eecf commit 128b6c5
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
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.2.14"
version = "0.3.0"
authors = ["Ashe Connor <kivikakk@github.com>"]
description = "A 100% CommonMark-compatible GitHub Flavored Markdown parser and formatter"
documentation = "https://docs.rs/comrak"
Expand Down
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,31 @@ Rust port of [github's `cmark-gfm`](https://github.com/github/cmark).
* [Contributors](#contributors)
* [Legal](#legal)


## Installation

Specify it as a requirement in `Cargo.toml`:

```toml
[dependencies]
comrak = "0.2"
comrak = "0.3"
```


## Usage

A binary is included which does everything you typically want:

```
$ comrak --help
comrak 0.2.14
comrak 0.3.0
Ashe Connor <kivikakk@github.com>
A 100% CommonMark-compatible GitHub Flavored Markdown parser and formatter
USAGE:
comrak [FLAGS] [OPTIONS] [--] [FILE]...
FLAGS:
--footnotes Parse footnotes
--github-pre-lang Use GitHub-style <pre lang> for code blocks
--hardbreaks Treat newlines as hard line breaks
-h, --help Prints help information
Expand Down Expand Up @@ -110,12 +111,14 @@ assert_eq!(
</ol>\n");
```


## Security

As with [`cmark-gfm`](https://github.com/github/cmark#security), Comrak will pass through inline HTML, dangerous links, anything you can imagine — it only performs Markdown to HTML conversion per the CommonMark/GFM spec. We recommend the use of a sanitisation library like [`ammonia`](https://github.com/notriddle/ammonia) configured specific to your needs.

You can also disable this potentially unsafe feature by using the `safe` option (or `--safe` at the command-line).


## Extensions

Comrak supports the five extensions to CommonMark defined in the
Expand All @@ -133,6 +136,7 @@ By default none are enabled; they are individually enabled with each parse by
setting the appropriate values in the
[`ComrakOptions` struct](https://docs.rs/comrak/newest/comrak/struct.ComrakOptions.html).


## Related projects

Comrak's design goal is to model the upstream [`cmark-gfm`](https://github.com/github/cmark) as closely as possible in terms of code structure. The upside of this is that a change in `cmark-gfm` has a very predictable change in Comrak. It helps that I maintain both, and tend to update Comrak in lock-step with `cmark-gfm`. Likewise, any bug in `cmark-gfm` is likely to be reproduced in Comrak. This could be considered a pro or a con, depending on your use case.
Expand All @@ -145,6 +149,7 @@ The downside, of course, is that the code is not what I'd call idiomatic Rust (_

As far as I know, Comrak is the only library to implement all of the [GitHub Flavored Markdown extensions](https://github.github.com/gfm) to the spec, but this tends to only be important if you want to reproduce GitHub's Markdown rendering exactly, e.g. in a GitHub client app.


## Contributors

Thank you for PRs and issues opened!
Expand All @@ -164,6 +169,7 @@ Thank you for PRs and issues opened!
* [steveklabnik](https://github.com/steveklabnik)
* [brson](https://github.com/brson)
* [Keats](https://github.com/Keats)
* [ayosec](https://github.com/ayosec)

## Legal

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

* Significant test coverage and code clean up. (#82, #83, Brian Anderson)
* Description list support. (#86, Ayose Cazorla)
* Example use of comrak to convert CommonMark documents into S-expressions. (#86, Ayose Cazorla)
* Footnotes are now enabled via an extension option, not a flag of its own. (#87)
* Extend `cmark-gfm` compatibility to include all extension and regression tests. (#87)

### 0.2.14

* Speed enhancements. (#76, Brian Anderson)
Expand Down

0 comments on commit 128b6c5

Please sign in to comment.