Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/cmark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ pub fn parse_paragraph(input: &str) -> Vec<Run> {

let mut options = Options::empty();
options.insert(Options::ENABLE_STRIKETHROUGH);

let parser = Parser::new_ext(input, options);
let iterator = TextMergeStream::new(parser);

Expand Down Expand Up @@ -61,12 +62,12 @@ pub fn parse_paragraph(input: &str) -> Vec<Run> {

#[cfg(test)]
mod tests {
// use super::*; // Import the parent module's items
use super::*; // Import the parent module's items

#[test]
fn test_basic_parsing() {
// let input = "Hello world, this is a ~~complicated~~ *very simple* example.";
// let runs = parse_paragraph(input);
// assert!(runs.len() == 5);
let input = "Hello world, this is a ~~complicated~~ *very simple* _example_.";
let runs = parse_paragraph(input);
assert!(runs.len() == 7);
}
}
Loading