mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-14 20:40:17 -05:00
Disable spell check in setlength arguments (#21491)
GitOrigin-RevId: 279f5df7c97b6a6caa5a344bf50b0747402cf61d
This commit is contained in:
parent
a827f8835b
commit
7fa8c01e31
3 changed files with 8 additions and 2 deletions
|
@ -135,7 +135,7 @@ export const LaTeXLanguage = LRLanguage.define({
|
|||
['UsePackage'],
|
||||
['FigureEnvironment', 'BeginEnv'],
|
||||
],
|
||||
ShortTextArgument: [['Date']],
|
||||
ShortTextArgument: [['Date'], ['SetLengthCommand']],
|
||||
TextArgument: [['TabularEnvironment', 'BeginEnv']],
|
||||
}),
|
||||
// TODO: does this override groups defined in the grammar?
|
||||
|
|
|
@ -107,7 +107,8 @@
|
|||
TextSubscriptCtrlSeq,
|
||||
TextStrikeOutCtrlSeq,
|
||||
EmphasisCtrlSeq,
|
||||
UnderlineCtrlSeq
|
||||
UnderlineCtrlSeq,
|
||||
SetLengthCtrlSeq
|
||||
}
|
||||
|
||||
@external specialize {EnvName} specializeEnvName from "./tokens.mjs" {
|
||||
|
@ -406,6 +407,9 @@ KnownCommand<ArgumentType> {
|
|||
} |
|
||||
UnderlineCommand {
|
||||
UnderlineCtrlSeq ArgumentType
|
||||
} |
|
||||
SetLengthCommand {
|
||||
SetLengthCtrlSeq optionalWhitespace? ShortTextArgument optionalWhitespace? ShortTextArgument
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -98,6 +98,7 @@ import {
|
|||
TextStrikeOutCtrlSeq,
|
||||
EmphasisCtrlSeq,
|
||||
UnderlineCtrlSeq,
|
||||
SetLengthCtrlSeq,
|
||||
} from './latex.terms.mjs'
|
||||
|
||||
const MAX_ARGUMENT_LOOKAHEAD = 100
|
||||
|
@ -603,6 +604,7 @@ const otherKnowncommands = {
|
|||
'\\sout': TextStrikeOutCtrlSeq,
|
||||
'\\emph': EmphasisCtrlSeq,
|
||||
'\\underline': UnderlineCtrlSeq,
|
||||
'\\setlength': SetLengthCtrlSeq,
|
||||
}
|
||||
// specializer for control sequences
|
||||
// return new tokens for specific control sequences
|
||||
|
|
Loading…
Reference in a new issue