Skip to content

Commit

Permalink
Sync with cmark-gfm-0.29.0.gfm.13
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalmoksha committed Sep 30, 2023
1 parent 8ac8845 commit 456bc1f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Collective](https://opencollective.com/comrak/all/badge.svg?label=financial+cont
[![crates.io version](https://img.shields.io/crates/v/comrak.svg)](https://crates.io/crates/comrak)
[![docs.rs](https://docs.rs/comrak/badge.svg)](https://docs.rs/comrak)

Rust port of [github's `cmark-gfm`](https://github.com/github/cmark). *Currently synced with release `0.29.0.gfm.12`*.
Rust port of [github's `cmark-gfm`](https://github.com/github/cmark). *Currently synced with release `0.29.0.gfm.13`*.

- [Installation](#installation)
- [Usage](#usage)
Expand Down
8 changes: 4 additions & 4 deletions src/parser/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ fn try_opening_header<'a>(
return Some((container, false, false));
}

let marker_row = match row(&line[parser.first_nonspace..]) {
Some(marker_row) => marker_row,
let delimiter_row = match row(&line[parser.first_nonspace..]) {
Some(delimiter_row) => delimiter_row,
None => return Some((container, false, true)),
};

Expand All @@ -52,7 +52,7 @@ fn try_opening_header<'a>(
None => return Some((container, false, true)),
};

if header_row.cells.len() != marker_row.cells.len() {
if header_row.cells.len() != delimiter_row.cells.len() {
return Some((container, false, true));
}

Expand All @@ -61,7 +61,7 @@ fn try_opening_header<'a>(
}

let mut alignments = vec![];
for cell in marker_row.cells {
for cell in delimiter_row.cells {
let cell_content = cell.content.as_bytes();
let left = !cell_content.is_empty() && cell_content[0] == b':';
let right = !cell_content.is_empty() && cell_content[cell_content.len() - 1] == b':';
Expand Down
4 changes: 2 additions & 2 deletions src/scanners.re
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ pub fn dangerous_url(s: &[u8]) -> Option<usize> {
table_spacechar = [ \t\v\f];
table_newline = [\r]?[\n];
table_marker = (table_spacechar*[:]?[-]+[:]?table_spacechar*);
table_delimiter = (table_spacechar*[:]?[-]+[:]?table_spacechar*);
table_cell = (escaped_char|[^\x00|\r\n])+;
*/
Expand All @@ -326,7 +326,7 @@ pub fn table_start(s: &[u8]) -> Option<usize> {
let mut marker = 0;
let len = s.len();
/*!re2c
[|]? table_marker ([|] table_marker)* [|]? table_spacechar* table_newline {
[|]? table_delimiter ([|] table_delimiter)* [|]? table_spacechar* table_newline {
return Some(cursor);
}
* { return None; }
Expand Down

0 comments on commit 456bc1f

Please sign in to comment.