Add a GetStandardProperties trait.

This commit is contained in:
Tom Alexander
2023-09-23 19:13:01 -04:00
parent d4f27ef297
commit b4c985071c
15 changed files with 132 additions and 431 deletions

View File

@@ -129,7 +129,7 @@ mod tests {
use crate::context::Context;
use crate::context::GlobalSettings;
use crate::context::List;
use crate::types::Source;
use crate::types::GetStandardProperties;
#[test]
fn two_paragraphs() {
@@ -150,13 +150,17 @@ line footnote.",
footnote_definition_matcher(remaining).expect("Parse second footnote_definition.");
assert_eq!(Into::<&str>::into(remaining), "");
assert_eq!(
first_footnote_definition.get_source(),
first_footnote_definition
.get_standard_properties()
.get_source(),
"[fn:1] A footnote.
"
);
assert_eq!(
second_footnote_definition.get_source(),
second_footnote_definition
.get_standard_properties()
.get_source(),
"[fn:2] A multi-
line footnote."
@@ -181,7 +185,9 @@ not in the footnote.",
footnote_definition_matcher(input).expect("Parse first footnote_definition");
assert_eq!(Into::<&str>::into(remaining), "not in the footnote.");
assert_eq!(
first_footnote_definition.get_source(),
first_footnote_definition
.get_standard_properties()
.get_source(),
"[fn:2] A multi-
line footnote.