mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 23:13:02 +01:00
fix r roxygen comment highlighting #2086
This commit is contained in:
parent
26a8cec43a
commit
65554d83e3
2 changed files with 17 additions and 1 deletions
|
|
@ -101,6 +101,21 @@ testTokenization('r', [
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
line: " #'",
|
||||||
|
tokens: [
|
||||||
|
{ startIndex: 0, type: 'white.r' },
|
||||||
|
{ startIndex: 1, type: 'comment.doc.r' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
line: " ",
|
||||||
|
tokens: [
|
||||||
|
{ startIndex: 0, type: 'white.r' },
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
|
||||||
// Strings
|
// Strings
|
||||||
[
|
[
|
||||||
|
|
|
||||||
|
|
@ -163,7 +163,7 @@ export const language = <languages.IMonarchLanguage>{
|
||||||
[/[{}\[\]()]/, '@brackets'],
|
[/[{}\[\]()]/, '@brackets'],
|
||||||
|
|
||||||
{ include: '@operators' },
|
{ include: '@operators' },
|
||||||
|
[/#'$/, 'comment.doc'],
|
||||||
[/#'/, 'comment.doc', '@roxygen'],
|
[/#'/, 'comment.doc', '@roxygen'],
|
||||||
[/(^#.*$)/, 'comment'],
|
[/(^#.*$)/, 'comment'],
|
||||||
|
|
||||||
|
|
@ -186,6 +186,7 @@ export const language = <languages.IMonarchLanguage>{
|
||||||
|
|
||||||
// Recognize Roxygen comments
|
// Recognize Roxygen comments
|
||||||
roxygen: [
|
roxygen: [
|
||||||
|
[/(^$)/, { token: 'comment.doc', next: '@pop' }],
|
||||||
[
|
[
|
||||||
/@\w+/,
|
/@\w+/,
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue