mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 16:15:41 +01:00
Merge pull request #63 from finalfantasia/master
[clojure] treat comma as whitespace
This commit is contained in:
commit
1c6738c96e
2 changed files with 20 additions and 2 deletions
|
|
@ -897,5 +897,23 @@ testTokenization('clojure', [
|
|||
'`',
|
||||
'~',
|
||||
"'",
|
||||
], 'meta')
|
||||
], 'meta'),
|
||||
|
||||
// treat comma as whitespace
|
||||
[
|
||||
{
|
||||
line: ', foo, :bar, "one", 2, ',
|
||||
tokens: [
|
||||
{startIndex: 0, type: 'white.clj'},
|
||||
{startIndex: 2, type: 'identifier.clj'},
|
||||
{startIndex: 5, type: 'white.clj'},
|
||||
{startIndex: 7, type: 'constant.clj'},
|
||||
{startIndex: 11, type: 'white.clj'},
|
||||
{startIndex: 13, type: 'string.clj'},
|
||||
{startIndex: 18, type: 'white.clj'},
|
||||
{startIndex: 20, type: 'number.clj'},
|
||||
{startIndex: 21, type: 'white.clj'}
|
||||
]
|
||||
}
|
||||
]
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -768,7 +768,7 @@ export const language = <ILanguage>{
|
|||
],
|
||||
|
||||
whitespace: [
|
||||
[/\s+/, 'white'],
|
||||
[/[\s,]+/, 'white'],
|
||||
[/;.*$/, 'comment'],
|
||||
[/\(comment\b/, 'comment', '@comment'],
|
||||
],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue