Implement the new fields for paragraph.

This commit is contained in:
Tom Alexander
2023-10-31 23:06:43 -04:00
parent 92d15c3d91
commit 281c35677b
3 changed files with 22 additions and 11 deletions

View File

@@ -74,7 +74,7 @@ fn anonymous_footnote<'b, 'g, 'r, 's>(
let (remaining, _) = tag("]")(remaining)?;
let (remaining, _trailing_whitespace) =
let (remaining, post_blank) =
maybe_consume_object_trailing_whitespace_if_not_exiting(context, remaining)?;
let source = get_consumed(input, remaining);
Ok((
@@ -82,7 +82,7 @@ fn anonymous_footnote<'b, 'g, 'r, 's>(
FootnoteReference {
source: source.into(),
contents: Some(contents.into()),
post_blank: _trailing_whitespace.map(Into::<&str>::into),
post_blank: post_blank.map(Into::<&str>::into),
label: None,
definition: children,
},
@@ -123,7 +123,7 @@ fn inline_footnote<'b, 'g, 'r, 's>(
let (remaining, _) = tag("]")(remaining)?;
let (remaining, _trailing_whitespace) =
let (remaining, post_blank) =
maybe_consume_object_trailing_whitespace_if_not_exiting(context, remaining)?;
let source = get_consumed(input, remaining);
Ok((
@@ -131,7 +131,7 @@ fn inline_footnote<'b, 'g, 'r, 's>(
FootnoteReference {
source: source.into(),
contents: Some(contents.into()),
post_blank: _trailing_whitespace.map(Into::<&str>::into),
post_blank: post_blank.map(Into::<&str>::into),
label: Some(label_contents.into()),
definition: children,
},
@@ -149,7 +149,7 @@ fn footnote_reference_only<'b, 'g, 'r, 's>(
let (remaining, _) = tag_no_case("[fn:")(input)?;
let (remaining, label_contents) = label(remaining)?;
let (remaining, _) = tag("]")(remaining)?;
let (remaining, _trailing_whitespace) =
let (remaining, post_blank) =
maybe_consume_object_trailing_whitespace_if_not_exiting(context, remaining)?;
let source = get_consumed(input, remaining);
Ok((
@@ -157,7 +157,7 @@ fn footnote_reference_only<'b, 'g, 'r, 's>(
FootnoteReference {
source: source.into(),
contents: None,
post_blank: _trailing_whitespace.map(Into::<&str>::into),
post_blank: post_blank.map(Into::<&str>::into),
label: Some(label_contents.into()),
definition: Vec::with_capacity(0),
},