Merge branch 'latex_fragment_properties'
This commit is contained in:
commit
8dde8ce4e1
@ -3185,10 +3185,21 @@ fn compare_latex_fragment<'b, 's>(
|
||||
emacs: &'b Token<'s>,
|
||||
rust: &'b LatexFragment<'s>,
|
||||
) -> Result<DiffEntry<'b, 's>, Box<dyn std::error::Error>> {
|
||||
let this_status = DiffStatus::Good;
|
||||
let message = None;
|
||||
let mut this_status = DiffStatus::Good;
|
||||
let mut message = None;
|
||||
|
||||
// TODO: Compare :value
|
||||
if let Some((new_status, new_message)) = compare_properties!(
|
||||
emacs,
|
||||
rust,
|
||||
(
|
||||
EmacsField::Required(":value"),
|
||||
|r| Some(r.value),
|
||||
compare_property_quoted_string
|
||||
)
|
||||
)? {
|
||||
this_status = new_status;
|
||||
message = new_message;
|
||||
}
|
||||
|
||||
Ok(DiffResult {
|
||||
status: this_status,
|
||||
|
@ -36,6 +36,7 @@ pub(crate) fn latex_fragment<'b, 'g, 'r, 's>(
|
||||
parser_with_context!(dollar_char_fragment)(context),
|
||||
parser_with_context!(bordered_dollar_fragment)(context),
|
||||
))(input)?;
|
||||
let value = get_consumed(input, remaining);
|
||||
let (remaining, _trailing_whitespace) =
|
||||
maybe_consume_object_trailing_whitespace_if_not_exiting(context, remaining)?;
|
||||
let source = get_consumed(input, remaining);
|
||||
@ -43,6 +44,7 @@ pub(crate) fn latex_fragment<'b, 'g, 'r, 's>(
|
||||
remaining,
|
||||
LatexFragment {
|
||||
source: source.into(),
|
||||
value: value.into(),
|
||||
},
|
||||
))
|
||||
}
|
||||
|
@ -180,6 +180,7 @@ pub struct Entity<'s> {
|
||||
#[derive(Debug, PartialEq)]
|
||||
pub struct LatexFragment<'s> {
|
||||
pub source: &'s str,
|
||||
pub value: &'s str,
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
|
Loading…
Reference in New Issue
Block a user