Skip to content

Commit

Permalink
0.18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kivikakk committed Mar 31, 2023
1 parent a11a4d4 commit 8fc0bee
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 14 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.17.1"
version = "0.18.0"
authors = ["Asherah Connor <[email protected]>"]
description = "A 100% CommonMark-compatible GitHub Flavored Markdown parser and formatter"
documentation = "https://docs.rs/comrak"
Expand Down
22 changes: 13 additions & 9 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.17"
comrak = "0.18"
```

Comrak supports Rust stable.
Expand Down Expand Up @@ -70,8 +70,8 @@ Options:
Enable full info strings for code blocks

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

--relaxed-tasklist-character
Enable relaxing which character is allowed in a tasklists
Expand All @@ -93,14 +93,14 @@ Options:
Multiple extensions can be delimited with ",", e.g. --extension strikethrough,table
[possible values: strikethrough, tagfilter, table, autolink, tasklist, superscript, footnotes,
description-lists]
[possible values: strikethrough, tagfilter, table, autolink, tasklist, superscript,
footnotes, description-lists]

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

-o, --output <FILE>
Write output to FILE instead of stdout
Expand All @@ -122,19 +122,23 @@ Options:
[default: base16-ocean.dark]

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

--sourcepos
Include source position attribute in HTML and XML output

-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.
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
7 changes: 7 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
### 0.18.0

* Improve performance of bundled plugins, and streaming I/O by @kivikakk in https://github.com/kivikakk/comrak/pull/288
* Implement Default for enums without using #[default] attribute by @silverpill in https://github.com/kivikakk/comrak/pull/293
* XML and sourcepos support by @kivikakk in https://github.com/kivikakk/comrak/pull/232
* Add a quadratic fuzzer by @philipturnbull in https://github.com/kivikakk/comrak/pull/295

### 0.17.1

* Fix some panics found by trivial fuzzing.
Expand Down
9 changes: 7 additions & 2 deletions examples/update-readme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,13 @@ fn main() -> Result<(), Box<dyn std::error::Error + 'static>> {
let mut content = HELP.to_string();
let mut cmd = std::process::Command::new("cargo");
content.push_str(
str::from_utf8(&cmd.args(["run", "--", "--help"]).output().unwrap().stdout)
.unwrap(),
str::from_utf8(
&cmd.args(["run", "--all-features", "--", "--help"])
.output()
.unwrap()
.stdout,
)
.unwrap(),
);
ncb.literal = content;
}
Expand Down
3 changes: 2 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,8 @@ fn main() -> Result<(), Box<dyn Error>> {
formatter(root, &options, &mut bw, &plugins)?;
bw.flush()?;
} else {
let mut bw = BufWriter::new(std::io::stdout().lock());
let stdout = std::io::stdout();
let mut bw = BufWriter::new(stdout.lock());
formatter(root, &options, &mut bw, &plugins)?;
bw.flush()?;
};
Expand Down

0 comments on commit 8fc0bee

Please sign in to comment.