diff --git a/src/r/r.test.ts b/src/r/r.test.ts index e7396278..c5a76cda 100644 --- a/src/r/r.test.ts +++ b/src/r/r.test.ts @@ -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 [ diff --git a/src/r/r.ts b/src/r/r.ts index 388a46f7..8ea23731 100644 --- a/src/r/r.ts +++ b/src/r/r.ts @@ -163,7 +163,7 @@ export const language = { [/[{}\[\]()]/, '@brackets'], { include: '@operators' }, - + [/#'$/, 'comment.doc'], [/#'/, 'comment.doc', '@roxygen'], [/(^#.*$)/, 'comment'],