Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
danieleades committed Aug 19, 2024
1 parent 7674b54 commit 173ae85
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ where
List(_) => Ok(()),
Strikethrough => formatter.write_str("~~"),
DefinitionList => Ok(()),
DefinitionListTitle => Ok(()),
DefinitionListTitle => formatter.write_char('\n'),
DefinitionListDefinition => formatter.write_str(": "),
}
}
Expand Down Expand Up @@ -608,8 +608,8 @@ where
}
TagEnd::Strikethrough => formatter.write_str("~~"),
TagEnd::DefinitionList => Ok(()),
TagEnd::DefinitionListTitle => Ok(()),
TagEnd::DefinitionListDefinition => Ok(()),
TagEnd::DefinitionListTitle => formatter.write_char('\n'),
TagEnd::DefinitionListDefinition => formatter.write_char('\n'),
},
HardBreak => formatter.write_str(" \n").and(padding(formatter, &state.padding)),
SoftBreak => formatter.write_char('\n').and(padding(formatter, &state.padding)),
Expand Down
10 changes: 4 additions & 6 deletions tests/fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1509,15 +1509,13 @@ mod definition_list {

#[test]
fn round_trip() {
let input = r"
First Term
let input = r"First Term
: This is the definition of the first term.
Second Term
: This is one definition of the second term.
: This is another definition of the second term.
";
: This is another definition of the second term.";

assert_events_eq(input);
assert_events_eq(input);
}
}
}

0 comments on commit 173ae85

Please sign in to comment.