Do not include whitespace at the end of value.
This commit is contained in:
@@ -3082,7 +3082,7 @@ fn compare_org_macro<'b, 's>(
|
||||
),
|
||||
(
|
||||
EmacsField::Required(":value"),
|
||||
|r| Some(r.source),
|
||||
|r| Some(r.macro_value),
|
||||
compare_property_quoted_string
|
||||
),
|
||||
(
|
||||
|
||||
@@ -26,6 +26,7 @@ pub(crate) fn org_macro<'b, 'g, 'r, 's>(
|
||||
let (remaining, macro_name) = org_macro_name(context, remaining)?;
|
||||
let (remaining, macro_args) = opt(parser_with_context!(org_macro_args)(context))(remaining)?;
|
||||
let (remaining, _) = tag("}}}")(remaining)?;
|
||||
let macro_value = get_consumed(input, remaining);
|
||||
let (remaining, _trailing_whitespace) =
|
||||
maybe_consume_object_trailing_whitespace_if_not_exiting(context, remaining)?;
|
||||
|
||||
@@ -40,6 +41,7 @@ pub(crate) fn org_macro<'b, 'g, 'r, 's>(
|
||||
.into_iter()
|
||||
.map(|arg| arg.into())
|
||||
.collect(),
|
||||
macro_value: Into::<&str>::into(macro_value),
|
||||
},
|
||||
))
|
||||
}
|
||||
|
||||
@@ -150,6 +150,7 @@ pub struct OrgMacro<'s> {
|
||||
pub source: &'s str,
|
||||
pub macro_name: &'s str,
|
||||
pub macro_args: Vec<&'s str>,
|
||||
pub macro_value: &'s str,
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
|
||||
Reference in New Issue
Block a user