Skip to content

Commit

Permalink
test: update paragraph tests to new parser implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
nfejzic committed Apr 19, 2023
1 parent db854ad commit 63ed44f
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions core/tests/elements/paragraph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ pub fn paragraph1_expected_result() -> Blocks {
let mut blocks: Blocks = Vec::with_capacity(2);

let block = Heading {
id: "head1".into(),
id: String::default(),
level: HeadingLevel::Level1,
content: "head1".parse_unimarkup_inlines().collect(),
content: " head1".parse_unimarkup_inlines().collect(),
attributes: None,
line_nr: 1,
};

blocks.push(block.into());

let block = Paragraph {
id: "paragraph-3".into(),
id: String::from("paragraph-3"),
content: "paragraph 1".parse_unimarkup_inlines().collect(),
attributes: None,
line_nr: 3,
Expand All @@ -68,9 +68,9 @@ pub fn paragraph2_expected_result() -> Blocks {
let mut blocks: Blocks = Vec::with_capacity(2);

let block = Heading {
id: "multi-line-header".into(),
id: String::default(),
level: HeadingLevel::Level1,
content: "multi\nline header".parse_unimarkup_inlines().collect(),
content: " multi\nline header".parse_unimarkup_inlines().collect(),
attributes: None,
line_nr: 1,
};
Expand All @@ -92,9 +92,9 @@ pub fn paragraph2_expected_result() -> Blocks {
pub fn paragraph3_expected_result() -> Blocks {
let mut blocks: Blocks = Vec::new();
let block = Heading {
id: "head2".into(),
id: String::default(),
level: HeadingLevel::Level1,
content: "head2".parse_unimarkup_inlines().collect(),
content: " head2".parse_unimarkup_inlines().collect(),
attributes: None,
line_nr: 1,
};
Expand All @@ -103,17 +103,17 @@ pub fn paragraph3_expected_result() -> Blocks {

let block = Paragraph {
id: "paragraph-3".into(),
content: "paragraph1".parse_unimarkup_inlines().collect(),
content: "paragraph1\n\n".parse_unimarkup_inlines().collect(),
attributes: None,
line_nr: 3,
};

blocks.push(block.into());

let block = Heading {
id: "subhead2".into(),
id: String::default(),
level: HeadingLevel::Level2,
content: "subhead2".parse_unimarkup_inlines().collect(),
content: " subhead2".parse_unimarkup_inlines().collect(),
attributes: None,
line_nr: 5,
};
Expand Down

0 comments on commit 63ed44f

Please sign in to comment.