From a75676a7e93a164899fb22b6adb1bd8012bd1a69 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 18 Jan 2017 15:25:19 +0100 Subject: [PATCH] Adopt latest monaco-editor-core --- package.json | 2 +- src/handlebars.ts | 11 +++++------ src/html.ts | 12 +++++++----- src/razor.ts | 8 +++----- src/ruby.ts | 6 +----- 5 files changed, 17 insertions(+), 22 deletions(-) diff --git a/package.json b/package.json index 96bba9c4..c0a2b4fe 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "jsdom-no-contextify": "^3.1.0", "merge-stream": "^1.0.0", "mocha": "^2.5.3", - "monaco-editor-core": "^0.7.0", + "monaco-editor-core": "^0.8.0", "object-assign": "^4.1.0", "rimraf": "^2.5.2", "typescript": "2.0.3" diff --git a/src/handlebars.ts b/src/handlebars.ts index 09397154..43e24f99 100644 --- a/src/handlebars.ts +++ b/src/handlebars.ts @@ -17,18 +17,17 @@ export var conf:IRichLanguageConfiguration = { wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g, comments: { - blockComment: [''] + blockComment: ['{{!--', '--}}'] }, brackets: [ [''], - ['{{', '}}'] + ['{{', '}}'], + ['<', '>'], + ['{', '}'], + ['(', ')'] ], - __electricCharacterSupport: { - embeddedElectricCharacters: ['*', '}', ']', ')'] - }, - autoClosingPairs: [ { open: '{', close: '}' }, { open: '[', close: ']' }, diff --git a/src/html.ts b/src/html.ts index 739dffe6..827226a1 100644 --- a/src/html.ts +++ b/src/html.ts @@ -23,12 +23,10 @@ export var conf:IRichLanguageConfiguration = { brackets: [ [''], ['<', '>'], + ['{', '}'], + ['(', ')'] ], - __electricCharacterSupport: { - embeddedElectricCharacters: ['*', '}', ']', ')'] - }, - autoClosingPairs: [ { open: '{', close: '}' }, { open: '[', close: ']' }, @@ -39,7 +37,11 @@ export var conf:IRichLanguageConfiguration = { surroundingPairs: [ { open: '"', close: '"' }, - { open: '\'', close: '\'' } + { open: '\'', close: '\'' }, + { open: '{', close: '}' }, + { open: '[', close: ']' }, + { open: '(', close: ')' }, + { open: '<', close: '>' }, ], onEnterRules: [ diff --git a/src/razor.ts b/src/razor.ts index 884b0a41..dcca23ee 100644 --- a/src/razor.ts +++ b/src/razor.ts @@ -22,14 +22,11 @@ export var conf:IRichLanguageConfiguration = { brackets: [ [''], + ['<', '>'], ['{', '}'], ['(', ')'] ], - __electricCharacterSupport: { - embeddedElectricCharacters: ['*', '}', ']', ')'] - }, - autoClosingPairs: [ { open: '{', close: '}' }, { open: '[', close: ']' }, @@ -39,7 +36,8 @@ export var conf:IRichLanguageConfiguration = { ], surroundingPairs: [ { open: '"', close: '"' }, - { open: '\'', close: '\'' } + { open: '\'', close: '\'' }, + { open: '<', close: '>' } ], onEnterRules: [ diff --git a/src/ruby.ts b/src/ruby.ts index f3fcce91..a5b9bdc3 100644 --- a/src/ruby.ts +++ b/src/ruby.ts @@ -20,11 +20,7 @@ export var conf:IRichLanguageConfiguration = { { open: '(', close: ')', notIn: ['string', 'comment'] }, { open: '{', close: '}', notIn: ['string', 'comment'] }, { open: '[', close: ']', notIn: ['string', 'comment'] }, - ], - __electricCharacterSupport: { - // trigger outdenting on 'end' - embeddedElectricCharacters: ['d'] - } + ] }; /*