mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-20 19:16:00 +00:00
Merge pull request #21535 from overleaf/ae-grammar-grouping
* Move $MathContainer grouping into the LaTeX grammar * Remove $Environment grouping from NodeProp.group GitOrigin-RevId: 96c74edd818bf84acf4b492702864c3c71a9bee3
This commit is contained in:
parent
79164f90d7
commit
2dee905361
2 changed files with 3 additions and 12 deletions
|
@ -163,17 +163,8 @@ export const LaTeXLanguage = LRLanguage.define({
|
|||
) {
|
||||
types.push('$TextArgument')
|
||||
}
|
||||
} else if (
|
||||
type.name.endsWith('Environment') &&
|
||||
!['NewEnvironment', 'RenewEnvironment'].includes(type.name)
|
||||
) {
|
||||
types.push('$Environment')
|
||||
} else if (type.name.endsWith('Brace')) {
|
||||
types.push('$Brace')
|
||||
} else if (
|
||||
['BracketMath', 'ParenMath', 'DollarMath'].includes(type.name)
|
||||
) {
|
||||
types.push('$MathContainer')
|
||||
}
|
||||
|
||||
if (type.name in typeMap) {
|
||||
|
|
|
@ -692,7 +692,7 @@ NonEmptyGroup<GroupContent> {
|
|||
|
||||
/// MATH MODE
|
||||
|
||||
DollarMath {
|
||||
DollarMath[@isGroup="$MathContainer"] {
|
||||
Dollar (InlineMath | DisplayMath) Dollar
|
||||
}
|
||||
|
||||
|
@ -714,7 +714,7 @@ CloseParenMath[openedBy=OpenParenMath] {
|
|||
}
|
||||
|
||||
// alternative syntax \( math \) for inline math, it is the same as $ math $
|
||||
ParenMath {
|
||||
ParenMath[@isGroup="$MathContainer"] {
|
||||
OpenParenMath
|
||||
Math?
|
||||
CloseParenMath
|
||||
|
@ -729,7 +729,7 @@ CloseBracketMath[openedBy=OpenBracketMath] {
|
|||
}
|
||||
|
||||
// alternative syntax \[ math \] for display math, it is the same as $$ math $$
|
||||
BracketMath {
|
||||
BracketMath[@isGroup="$MathContainer"] {
|
||||
OpenBracketMath
|
||||
Math?
|
||||
CloseBracketMath
|
||||
|
|
Loading…
Add table
Reference in a new issue