Fix footnote reference type.
This commit is contained in:
parent
9565435526
commit
5ac12229f4
@ -54,6 +54,7 @@ use crate::types::ExportSnippet;
|
|||||||
use crate::types::FixedWidthArea;
|
use crate::types::FixedWidthArea;
|
||||||
use crate::types::FootnoteDefinition;
|
use crate::types::FootnoteDefinition;
|
||||||
use crate::types::FootnoteReference;
|
use crate::types::FootnoteReference;
|
||||||
|
use crate::types::FootnoteReferenceType;
|
||||||
use crate::types::GetStandardProperties;
|
use crate::types::GetStandardProperties;
|
||||||
use crate::types::Heading;
|
use crate::types::Heading;
|
||||||
use crate::types::HorizontalRule;
|
use crate::types::HorizontalRule;
|
||||||
@ -3323,7 +3324,10 @@ fn compare_footnote_reference<'b, 's>(
|
|||||||
),
|
),
|
||||||
(
|
(
|
||||||
EmacsField::Required(":type"),
|
EmacsField::Required(":type"),
|
||||||
|_| Some("inline"),
|
|r| Some(match r.get_type() {
|
||||||
|
FootnoteReferenceType::Standard => "standard",
|
||||||
|
FootnoteReferenceType::Inline => "inline",
|
||||||
|
}),
|
||||||
compare_property_unquoted_atom
|
compare_property_unquoted_atom
|
||||||
)
|
)
|
||||||
)? {
|
)? {
|
||||||
|
@ -69,6 +69,7 @@ pub use object::DayOfMonthInner;
|
|||||||
pub use object::Entity;
|
pub use object::Entity;
|
||||||
pub use object::ExportSnippet;
|
pub use object::ExportSnippet;
|
||||||
pub use object::FootnoteReference;
|
pub use object::FootnoteReference;
|
||||||
|
pub use object::FootnoteReferenceType;
|
||||||
pub use object::Hour;
|
pub use object::Hour;
|
||||||
pub use object::HourInner;
|
pub use object::HourInner;
|
||||||
pub use object::InlineBabelCall;
|
pub use object::InlineBabelCall;
|
||||||
|
@ -764,3 +764,19 @@ impl<'s> OrgMacro<'s> {
|
|||||||
.map(|arg| coalesce_whitespace_escaped('\\', |c| ",".contains(c))(*arg))
|
.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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user