Recognize space aliases when scanning TeX quantities
This commit is contained in:
1 parent
da48cf9cad
commit
69efe0b895
3 files changed
+44
-4
No files matched your search
@@ -261,7 +261,7 @@ impl Executor {
|
||||
for (i, c) in keyword.chars().enumerate() {
|
||||
let next = loop {
|
||||
let next = self.expanded(files)?;
|
||||
if i == 0 && next.as_ref().is_some_and(|t| t.token.kind.is_space()) {
|
||||
if i == 0 && next.as_ref().is_some_and(|t| self.is_spacer(&t.token)) {
|
||||
continue;
|
||||
}
|
||||
break next;
|
||||
@@ -299,7 +299,7 @@ impl Executor {
|
||||
}
|
||||
pub(super) fn optional_space(&mut self, files: &mut impl SourceProvider) -> Result<(), Error> {
|
||||
if let Some(t) = self.expanded(files)?
|
||||
&& !t.token.kind.is_space()
|
||||
&& !self.is_spacer(&t.token)
|
||||
{
|
||||
self.unread(t)?;
|
||||
}
|
||||
@@ -361,7 +361,7 @@ impl Executor {
|
||||
TokenKind::Character('.' | ',', CatCode::Other)
|
||||
) {
|
||||
has_point = true;
|
||||
} else if !t.token.kind.is_space() {
|
||||
} else if !self.is_spacer(&t.token) {
|
||||
self.unread(t)?;
|
||||
}
|
||||
break;
|
||||
@@ -389,7 +389,7 @@ impl Executor {
|
||||
digits.push(c as i64 - '0' as i64);
|
||||
}
|
||||
} else {
|
||||
if !t.token.kind.is_space() {
|
||||
if !self.is_spacer(&t.token) {
|
||||
self.unread(t)?;
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user