mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 17:25:39 +01:00
add line break in example
This commit is contained in:
parent
bad3c34056
commit
a9dbe7bcaf
1 changed files with 2 additions and 1 deletions
|
|
@ -28,7 +28,8 @@ monaco.languages.registerCompletionItemProvider('json', {
|
||||||
provideCompletionItems: function(model, position) {
|
provideCompletionItems: function(model, position) {
|
||||||
// find out if we are completing a property in the 'dependencies' object.
|
// find out if we are completing a property in the 'dependencies' object.
|
||||||
var textUntilPosition = model.getValueInRange({startLineNumber: 1, startColumn: 1, endLineNumber: position.lineNumber, endColumn: position.column});
|
var textUntilPosition = model.getValueInRange({startLineNumber: 1, startColumn: 1, endLineNumber: position.lineNumber, endColumn: position.column});
|
||||||
var match = textUntilPosition.match(/"dependencies"\s*:\s*{\s*("[^"]*"\s*:\s*"[^"]*"\s*,\s*)*("[^"]*)?$/); if (match) {
|
var match = textUntilPosition.match(/"dependencies"\s*:\s*{\s*("[^"]*"\s*:\s*"[^"]*"\s*,\s*)*("[^"]*)?$/);
|
||||||
|
if (match) {
|
||||||
return createDependencyProposals();
|
return createDependencyProposals();
|
||||||
}
|
}
|
||||||
return [];
|
return [];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue