Fixed highlight bug
This commit is contained in:
parent
2363dc8edf
commit
49e627a8a6
@ -35,7 +35,8 @@ import {
|
||||
AceHighlightRule,
|
||||
AceHighlightRules,
|
||||
dotOperatorHighlightRule,
|
||||
endGroupHighlightRule
|
||||
endGroupHighlightRule,
|
||||
identifierRe
|
||||
} from '@shared/models/ace/ace.models';
|
||||
import { HelpLinks, ValueType } from '@shared/models/constants';
|
||||
import { formPropertyCompletions } from '@shared/models/dynamic-form.models';
|
||||
@ -924,8 +925,6 @@ export class ScadaSymbolElement {
|
||||
|
||||
}
|
||||
|
||||
const identifierRe = /[a-zA-Z$_\u00a1-\uffff][a-zA-Z\d$_\u00a1-\uffff]*/;
|
||||
|
||||
const scadaSymbolCtxObjectHighlightRule: AceHighlightRule = {
|
||||
token: 'tb.scada-symbol-ctx',
|
||||
regex: /\bctx\b/,
|
||||
|
||||
@ -376,5 +376,7 @@ export const endGroupHighlightRule: AceHighlightRule = {
|
||||
next: 'no_regex'
|
||||
};
|
||||
|
||||
export const identifierRe = /[a-zA-Z$_\u00a1-\uffff][a-zA-Z\d$_\u00a1-\uffff]*/;
|
||||
|
||||
|
||||
|
||||
|
||||
@ -32,7 +32,8 @@ import {
|
||||
AceHighlightRule,
|
||||
AceHighlightRules,
|
||||
dotOperatorHighlightRule,
|
||||
endGroupHighlightRule
|
||||
endGroupHighlightRule,
|
||||
identifierRe
|
||||
} from '@shared/models/ace/ace.models';
|
||||
|
||||
export interface CalculatedField extends Omit<BaseData<CalculatedFieldId>, 'label'>, HasVersion, HasEntityDebugSettings, HasTenantId, ExportableEntity<CalculatedFieldId> {
|
||||
@ -480,6 +481,17 @@ export const getCalculatedFieldArgumentsHighlights = (
|
||||
? 'calculatedFieldRollingArgumentValue'
|
||||
: 'calculatedFieldSingleArgumentValue'
|
||||
})),
|
||||
no_regex: [
|
||||
{
|
||||
token: 'tb.identifier',
|
||||
regex: identifierRe,
|
||||
},
|
||||
{
|
||||
token: 'tb.paren.lparen',
|
||||
regex: '\\(',
|
||||
next: 'start'
|
||||
}
|
||||
],
|
||||
...calculatedFieldSingleArgumentValueHighlightRules,
|
||||
...calculatedFieldRollingArgumentValueHighlightRules,
|
||||
...calculatedFieldTimeWindowArgumentValueHighlightRules
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user