Skip to content

Commit

Permalink
support labels with key+command
Browse files Browse the repository at this point in the history
  • Loading branch information
nolanking90 committed Oct 23, 2024
1 parent 8fc43f6 commit ac92584
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion crates/parser/src/latex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,20 @@ impl<'a> Parser<'a> {
}

if self.lexer.peek() == Some(Token::LCurly) {
self.curly_group_word();
self.builder.start_node(CURLY_GROUP_WORD.into());
self.eat();
self.trivia();

if self.peek() == Some(Token::Word) || self.peek() == Some(Token::Pipe) {
self.key();
}

if let Some(Token::CommandName(_)) = self.peek() {
self.content(ParserContext::default());
}

self.expect(Token::RCurly);
self.builder.finish_node();
}

self.builder.finish_node();
Expand Down

0 comments on commit ac92584

Please sign in to comment.