Skip to content

Applied custom editor color rules#384

Open
stijnpotters1 wants to merge 2 commits intomasterfrom
feat/editor-color-rules
Open

Applied custom editor color rules#384
stijnpotters1 wants to merge 2 commits intomasterfrom
feat/editor-color-rules

Conversation

@stijnpotters1
Copy link
Copy Markdown
Contributor

@stijnpotters1 stijnpotters1 commented Mar 24, 2026

Changed theme to flow-vs-{theme} instead of vs-{theme} to prevent internal monaco editor theme conflicts

image image

Copilot AI review requested due to automatic review settings March 24, 2026 19:09
@stijnpotters1 stijnpotters1 self-assigned this Mar 24, 2026
@stijnpotters1 stijnpotters1 requested review from Daan0709 and Matthbo and removed request for Copilot March 24, 2026 19:10
@stijnpotters1 stijnpotters1 linked an issue Mar 24, 2026 that may be closed by this pull request
@github-project-automation github-project-automation bot moved this to In Progress in Frank!Framework Mar 24, 2026
@stijnpotters1 stijnpotters1 moved this from In Progress to Review in Frank!Framework Mar 24, 2026
@sonarqubecloud
Copy link
Copy Markdown

Comment on lines +53 to +95
tokenizer: {
root: [
[/[^<&]+/, ''],
[/&\w+;/, 'string.escape'],
[/<!\[CDATA\[/, { token: 'delimiter.cdata', next: '@cdata' }],
[/<!--/, { token: 'comment', next: '@comment' }],
[/(<\?)(\w[\w\d.]*)/, [{ token: 'delimiter' }, { token: 'metatag', next: '@xmlDecl' }]],
[/(<\/)(\w[\w\d.:_-]*)/, [{ token: 'delimiter' }, { token: 'tag', next: '@tag' }]],
[/(<)(\w[\w\d.:_-]*)/, [{ token: 'delimiter' }, { token: 'tag', next: '@tag' }]],
[/</, { token: 'delimiter' }],
],
cdata: [
[/[^\]]+/, ''],
[/\]\]>/, { token: 'delimiter.cdata', next: '@pop' }],
[/\]/, ''],
],
xmlDecl: [
[/\s+/, ''],
[/[\w:-]+/, 'attribute.name'],
[/=/, 'delimiter'],
[/"[^"]*"/, 'attribute.value'],
[/'[^']*'/, 'attribute.value'],
[/\?>/, { token: 'delimiter', next: '@pop' }],
],
tag: [
[/\s+/, ''],
// flow: namespace attributes — literal regexes, matched before generic rules
[/((?:xmlns:flow|flow:[\w-]+))(\s*=\s*(?:"[^"]*"|'[^']*'))/, ['flow-attribute', 'flow-attribute-value']],
[/(?:xmlns:flow|flow:[\w-]+)/, 'flow-attribute'],
// Regular attributes
[/([\w.:_-]+)(\s*=\s*(?:"[^"]*"|'[^']*'))/, ['attribute.name', 'attribute.value']],
[/[\w.:_-]+/, 'attribute.name'],
[/=/, 'delimiter'],
[/\/>/, { token: 'delimiter', next: '@pop' }],
[/>/, { token: 'delimiter', next: '@pop' }],
],
comment: [
[/-->/, { token: 'comment', next: '@pop' }],
[/[^-]+/, 'comment'],
[/--/, 'comment'],
[/./, 'comment'],
],
},
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed?
Isn't the default XML highlighter enough?
This seems like a lot of manual logic to do what should either already be done through monaco's highlighting itself or adds something custom that normal editors usually don't have either

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Review

Development

Successfully merging this pull request may close these issues.

Add colorcoding to flow namespace elements/attributes

2 participants