Fix footnote reference type.

This commit is contained in:
Tom Alexander
2023-10-09 13:23:08 -04:00
parent 9565435526
commit 5ac12229f4
3 changed files with 22 additions and 1 deletions

View File

@@ -69,6 +69,7 @@ pub use object::DayOfMonthInner;
pub use object::Entity;
pub use object::ExportSnippet;
pub use object::FootnoteReference;
pub use object::FootnoteReferenceType;
pub use object::Hour;
pub use object::HourInner;
pub use object::InlineBabelCall;

View File

@@ -764,3 +764,19 @@ impl<'s> OrgMacro<'s> {
.map(|arg| coalesce_whitespace_escaped('\\', |c| ",".contains(c))(*arg))
}
}
#[derive(Debug, PartialEq)]
pub enum FootnoteReferenceType {
Standard,
Inline,
}
impl<'s> FootnoteReference<'s> {
pub fn get_type(&self) -> FootnoteReferenceType {
if self.definition.is_empty() {
FootnoteReferenceType::Standard
} else {
FootnoteReferenceType::Inline
}
}
}