Skip to content

Commit

Permalink
0.15.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kivikakk committed Nov 14, 2022
1 parent 8caec3f commit 3421af3
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 43 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.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "comrak"
version = "0.14.0"
authors = ["Ashe Connor <ashe@kivikakk.ee>"]
version = "0.15.0"
authors = ["Asherah Connor <ashe@kivikakk.ee>"]
description = "A 100% CommonMark-compatible GitHub Flavored Markdown parser and formatter"
documentation = "https://docs.rs/comrak"
homepage = "https://github.com/kivikakk/comrak"
Expand Down
123 changes: 83 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Specify it as a requirement in `Cargo.toml`:

``` toml
[dependencies]
comrak = "0.14"
comrak = "0.15"
```

Comrak supports Rust stable.
Expand All @@ -43,47 +43,90 @@ curl.exe -A "MS" https://webinstall.dev/comrak | powershell

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

USAGE:
comrak [FLAGS] [OPTIONS] [--] [FILE]...

FLAGS:
--escape Escape raw HTML instead of clobbering it
--gfm Enable GitHub-flavored markdown extensions strikethrough, tagfilter, table, autolink, and
tasklist. It also enables --github-pre-lang.
--github-pre-lang Use GitHub-style <pre lang> for code blocks
--hardbreaks Treat newlines as hard line breaks
-h, --help Prints help information
--smart Use smart punctuation
--unsafe Allow raw HTML and dangerous URLs
-V, --version Prints version information

OPTIONS:
-c, --config-file <PATH> Path to config file containing command-line arguments, or `none'
[default: /Users/kivikakk/.config/comrak/config]
--default-info-string <INFO> Default value for fenced code block's info strings if none is given
-e, --extension <EXTENSION>... Specify an extension name to use [possible values: strikethrough,
tagfilter, table, autolink, tasklist, superscript, footnotes,
description-lists]
-t, --to <FORMAT> Specify output format [default: html] [possible values: html,
commonmark]
--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
--list-style <LIST_STYLE> Specify bullet character for lists (-, +, *) in CommonMark ouput
[default: dash] [possible values: dash, plus, star]
-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:
<FILE>... The CommonMark file to parse; or standard input if none passed

By default, Comrak will attempt to read command-line options from a config file specified by --config-file. This
behaviour can be disabled by passing --config-file none. It is not an error if the file does not exist.
Usage: comrak [OPTIONS] [FILE]...

Arguments:
[FILE]...
CommonMark file(s) to parse; or standard input if none passed

Options:
-c, --config-file <PATH>
Path to config file containing command-line arguments, or 'none'
[default: /Users/kivikakk/.config/comrak/config]

--hardbreaks
Treat newlines as hard line breaks

--smart
Use smart punctuation

--github-pre-lang
Use GitHub-style <pre lang> for code blocks

--gfm
Enable GitHub-flavored markdown extensions: strikethrough, tagfilter, table, autolink, and
tasklist. Also enables --github-pre-lang

--default-info-string <INFO>
Default value for fenced code block's info strings if none is given

--unsafe
Allow raw HTML and dangerous URLs

--escape
Escape raw HTML instead of clobbering it

-e, --extension <EXTENSION>
Specify extension name(s) to use
Multiple extensions can be delimited with ",", e.g. --extension strikethrough,table
[possible values: strikethrough, tagfilter, table, autolink, tasklist, superscript,
footnotes, description-lists]

-t, --to <FORMAT>
Specify output format
[default: html]
[possible values: html, commonmark]

-o, --output <FILE>
Write output to FILE instead of stdout

--width <WIDTH>
Specify wrap width (0 = nowrap)
[default: 0]

--header-ids <PREFIX>
Use the Comrak header IDs extension, with the given ID prefix

--front-matter-delimiter <DELIMITER>
Ignore front-matter that starts and ends with the given string

--syntax-highlighting <THEME>
Syntax highlighting for codefence blocks. Choose a theme or 'none' for disabling
[default: base16-ocean.dark]

--list-style <LIST_STYLE>
Specify bullet character for lists (-, +, *) in CommonMark ouput
[default: dash]
[possible values: dash, plus, star]

-h, --help
Print help information (use `-h` for a summary)

-V, --version
Print version information

By default, Comrak will attempt to read command-line options from a config file specified by
--config-file. This behaviour can be disabled by passing --config-file none. It is not an error if
the file does not exist.
```

And there's a Rust interface. You can use `comrak::markdown_to_html` directly:
Expand Down
16 changes: 16 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
### 0.15.0

* table: fix start_line of Table itself by @kivikakk in https://github.com/kivikakk/comrak/pull/231
* Rename header file to match c libname by @gjtorikian in https://github.com/kivikakk/comrak/pull/233
* Change the name of the ifdef by @gjtorikian in https://github.com/kivikakk/comrak/pull/234
* Add `comrak_set_parse_option_smart` by @gjtorikian in https://github.com/kivikakk/comrak/pull/235
* Allow `c_char` options to be NULL by @gjtorikian in https://github.com/kivikakk/comrak/pull/237
* Replace `lazy_static` dependency with `once_cell` by @Turbo87 in https://github.com/kivikakk/comrak/pull/238
* Make `comrak --help` readable on my terminal by @mgeisler in https://github.com/kivikakk/comrak/pull/242
* c-api: fix CI build by @kivikakk in https://github.com/kivikakk/comrak/pull/240
* Bump versions of some dependencies by @helmet91 in https://github.com/kivikakk/comrak/pull/243
* Adding functionality to build SyntectAdapters with custom themes, syntax sets, etc. by @ArvinSKushwaha in https://github.com/kivikakk/comrak/pull/239
* Make shell-words and xdg dependencies optional by @silverpill in https://github.com/kivikakk/comrak/pull/245
* Bump clap version to 4.0 and switch to the Derive API by @tranzystorek-io in https://github.com/kivikakk/comrak/pull/248
* c-api: remove by @kivikakk in https://github.com/kivikakk/comrak/pull/249

### 0.14.0

* Add C FFI, allowing Comrak to be used from other languages. (#171, Garen
Expand Down

0 comments on commit 3421af3

Please sign in to comment.