mirror of
https://github.com/typst/typst
synced 2025-05-13 20:46:23 +08:00
Formatting 🌿
This commit is contained in:
parent
d986bc4b0a
commit
56acc9982c
@ -81,7 +81,7 @@ impl Parser<'_> {
|
||||
} else {
|
||||
SyntaxNode::Spacing
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
Token::LineComment(_) | Token::BlockComment(_) => {
|
||||
self.at_block_or_line_start = was_at_block_or_line_start;
|
||||
@ -182,9 +182,7 @@ impl Parser<'_> {
|
||||
self.skip_white();
|
||||
|
||||
let mut tree = SyntaxTree::new();
|
||||
while !self.eof()
|
||||
&& !matches!(self.peekv(), Some(Token::Space(n)) if n >= 1)
|
||||
{
|
||||
while !self.eof() && !matches!(self.peekv(), Some(Token::Space(n)) if n >= 1) {
|
||||
if let Some(node) = self.parse_node() {
|
||||
tree.push(node);
|
||||
}
|
||||
|
@ -269,7 +269,7 @@ impl<'s> Iterator for Tokens<'s> {
|
||||
'`' if self.mode == Body => self.read_raw_or_code(),
|
||||
|
||||
// Sections.
|
||||
'#' if self.mode == Body => Hashtag,
|
||||
'#' if self.mode == Body => Hashtag,
|
||||
|
||||
// Non-breaking spaces.
|
||||
'~' if self.mode == Body => Text("\u{00A0}"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user