Compare commits
No commits in common. "ab281de3c6b74c137554c656c8e76b16f4e38f94" and "9cfb2fa052c9cabb28d79bcf0afdac48df7ddcd4" have entirely different histories.
ab281de3c6
...
9cfb2fa052
@ -28,7 +28,7 @@ pub(crate) fn entity<'b, 'g, 'r, 's>(
|
||||
let (remaining, _) = tag("\\")(input)?;
|
||||
let (remaining, (entity_definition, entity_name, use_brackets)) = name(context, remaining)?;
|
||||
|
||||
let (remaining, post_blank) =
|
||||
let (remaining, _trailing_whitespace) =
|
||||
maybe_consume_object_trailing_whitespace_if_not_exiting(context, remaining)?;
|
||||
|
||||
let source = get_consumed(input, remaining);
|
||||
@ -43,7 +43,6 @@ pub(crate) fn entity<'b, 'g, 'r, 's>(
|
||||
ascii: entity_definition.ascii,
|
||||
utf8: entity_definition.utf8,
|
||||
use_brackets,
|
||||
post_blank: post_blank.map(Into::<&str>::into),
|
||||
},
|
||||
))
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ pub(crate) fn latex_fragment<'b, 'g, 'r, 's>(
|
||||
parser_with_context!(bordered_dollar_fragment)(context),
|
||||
))(input)?;
|
||||
let value = get_consumed(input, remaining);
|
||||
let (remaining, post_blank) =
|
||||
let (remaining, _trailing_whitespace) =
|
||||
maybe_consume_object_trailing_whitespace_if_not_exiting(context, remaining)?;
|
||||
let source = get_consumed(input, remaining);
|
||||
Ok((
|
||||
@ -47,7 +47,6 @@ pub(crate) fn latex_fragment<'b, 'g, 'r, 's>(
|
||||
LatexFragment {
|
||||
source: source.into(),
|
||||
value: value.into(),
|
||||
post_blank: post_blank.map(Into::<&str>::into),
|
||||
},
|
||||
))
|
||||
}
|
||||
|
@ -187,14 +187,12 @@ pub struct Entity<'s> {
|
||||
// Skipping latin1 because it is detrimental to the future. If anyone out there is using latin1, take a long look in the mirror and change your ways.
|
||||
pub utf8: &'s str,
|
||||
pub use_brackets: bool,
|
||||
pub post_blank: Option<&'s str>,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct LatexFragment<'s> {
|
||||
pub source: &'s str,
|
||||
pub value: &'s str,
|
||||
pub post_blank: Option<&'s str>,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
@ -742,15 +740,11 @@ impl<'s> StandardProperties<'s> for Entity<'s> {
|
||||
}
|
||||
|
||||
fn get_contents<'b>(&'b self) -> Option<&'s str> {
|
||||
None
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn get_post_blank(&self) -> PostBlank {
|
||||
self.post_blank
|
||||
.map(|post_blank| post_blank.chars().count())
|
||||
.unwrap_or(0)
|
||||
.try_into()
|
||||
.expect("Too much post-blank to fit into a PostBlank.")
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
@ -760,15 +754,11 @@ impl<'s> StandardProperties<'s> for LatexFragment<'s> {
|
||||
}
|
||||
|
||||
fn get_contents<'b>(&'b self) -> Option<&'s str> {
|
||||
None
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn get_post_blank(&self) -> PostBlank {
|
||||
self.post_blank
|
||||
.map(|post_blank| post_blank.chars().count())
|
||||
.unwrap_or(0)
|
||||
.try_into()
|
||||
.expect("Too much post-blank to fit into a PostBlank.")
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user