Skip to content

Commit

Permalink
0.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kivikakk committed Jan 14, 2020
1 parent 52b7c7c commit 44f7335
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 12 deletions.
5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "comrak"
version = "0.6.2"
version = "0.7.0"
authors = ["Ashe Connor <[email protected]>"]
description = "A 100% CommonMark-compatible GitHub Flavored Markdown parser and formatter"
documentation = "https://docs.rs/comrak"
Expand All @@ -22,8 +22,7 @@ doc = false

[dependencies]
typed-arena = "1.4.1"
regex = "= 1.0.1"
regex-syntax = "= 0.6.8"
regex = "1.0.1"
lazy_static = "1.0.1"
entities = "1.0.1"
unicode_categories = "0.1.1"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Specify it as a requirement in `Cargo.toml`:

``` toml
[dependencies]
comrak = "0.6"
comrak = "0.7"
```

Comrak supports Rust stable.
Expand All @@ -30,7 +30,7 @@ A binary is included which does everything you typically want:

``` console
$ comrak --help
comrak 0.6.2
comrak 0.7.0
Ashe Connor <[email protected]>
A 100% CommonMark-compatible GitHub Flavored Markdown parser and formatter

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.7.0

* Supporting stable and newer again, since dependencies keep breaking for
1.27.0. (#134)

### 0.6.2

* Exclude unneeded files from crate. (#120, Igor Gnatenko)
Expand Down
2 changes: 1 addition & 1 deletion src/cm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use std::io::{self, Write};
pub fn format_document<'a>(
root: &'a AstNode<'a>,
options: &ComrakOptions,
output: &mut Write,
output: &mut dyn Write,
) -> io::Result<()> {
let mut f = CommonMarkFormatter::new(root, options);
f.format(root);
Expand Down
6 changes: 3 additions & 3 deletions src/html.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use std::str;
pub fn format_document<'a>(
root: &'a AstNode<'a>,
options: &ComrakOptions,
output: &mut Write,
output: &mut dyn Write,
) -> io::Result<()> {
let mut writer = WriteWithLast {
output: output,
Expand All @@ -28,7 +28,7 @@ pub fn format_document<'a>(
}

pub struct WriteWithLast<'w> {
output: &'w mut Write,
output: &'w mut dyn Write,
pub last_was_lf: Cell<bool>,
}

Expand Down Expand Up @@ -200,7 +200,7 @@ fn tagfilter(literal: &[u8]) -> bool {
false
}

fn tagfilter_block(input: &[u8], o: &mut Write) -> io::Result<()> {
fn tagfilter_block(input: &[u8], o: &mut dyn Write) -> io::Result<()> {
let size = input.len();
let mut i = 0;

Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use std::error::Error;
use std::io::Read;
use std::process;

fn main() -> Result<(), Box<Error>> {
fn main() -> Result<(), Box<dyn Error>> {
let matches = clap::App::new(crate_name!())
.version(crate_version!())
.author(crate_authors!())
Expand Down
2 changes: 1 addition & 1 deletion src/parser/inlines.rs
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ impl<'a, 'r, 'o, 'd, 'i, 'c, 'subj> Subject<'a, 'r, 'o, 'd, 'i, 'c, 'subj> {
make_inline(self.arena, NodeValue::Text(vec![b'`'; openticks]))
}
Some(endpos) => {
let mut buf = &self.input[startpos..endpos - openticks];
let buf = &self.input[startpos..endpos - openticks];
let buf = strings::normalize_code(buf);
make_inline(self.arena, NodeValue::Code(buf))
}
Expand Down
2 changes: 1 addition & 1 deletion src/scanners.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ struct Lexer;
#[inline(always)]
fn search(rule: Rule, line: &[u8]) -> Option<usize> {
if let Ok(pairs) = Lexer::parse(rule, unsafe { str::from_utf8_unchecked(line) }) {
Some(pairs.last().unwrap().into_span().end())
Some(pairs.last().unwrap().as_span().end())
} else {
None
}
Expand Down

0 comments on commit 44f7335

Please sign in to comment.