Skip to content

Commit

Permalink
Support more macros for defining commands
Browse files Browse the repository at this point in the history
Partially resolve #1081.

Signed-off-by: Jonas Dujava <[email protected]>
  • Loading branch information
jdujava committed Apr 20, 2024
1 parent 76837fe commit 738fdc1
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions crates/parser/src/latex/lexer/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,10 @@ pub fn classify(name: &str, config: &SyntaxConfig) -> CommandName {
"label" => CommandName::LabelDefinition,
"crefrange" | "crefrange*" | "Crefrange" | "Crefrange*" => CommandName::LabelReferenceRange,
"newlabel" => CommandName::LabelNumber,
"newcommand"
| "newcommand*"
| "renewcommand"
| "renewcommand*"
| "DeclareRobustCommand"
| "DeclareRobustCommand*" => CommandName::CommandDefinition,
"newcommand" | "newcommand*" | "renewcommand" | "renewcommand*"
| "DeclareRobustCommand" | "DeclareRobustCommand*"
| "NewDocumentCommand" | "RenewDocumentCommand" | "DeclareDocumentCommand"
| "NewCommandCopy" | "RenewCommandCopy" | "DeclareCommandCopy" => CommandName::CommandDefinition,
"DeclareMathOperator" | "DeclareMathOperator*" => CommandName::MathOperator,
"newglossaryentry" => CommandName::GlossaryEntryDefinition,
"gls" | "Gls" | "GLS" | "glspl" | "Glspl" | "GLSpl" | "glsdisp" | "glslink" | "glstext"
Expand Down

0 comments on commit 738fdc1

Please sign in to comment.