Merge remote-tracking branch 'origin/master' into PAPERPANKS-master

This commit is contained in:
Alex Dima 2018-03-13 22:10:38 +01:00
commit 290dd05367
19 changed files with 6177 additions and 1266 deletions

View file

@ -154,7 +154,7 @@
<img src="https://opensource.microsoft.com/img/microsoft.png" alt="Microsoft" style="max-height:23px;margin-bottom:12px;">
</a>
<br/>
<small>&copy; 2017 Microsoft</small>
<small>&copy; 2018 Microsoft</small>
</p>
</footer>

View file

@ -4291,7 +4291,7 @@ return {
<footer class="container">
<hr>
<p class="text-center">
<small>&copy; 2017 Microsoft</small>
<small>&copy; 2018 Microsoft</small>
</p>
</footer>

View file

@ -67,7 +67,7 @@
<footer class="container">
<hr>
<p class="text-center">
<small>&copy; 2017 Microsoft</small>
<small>&copy; 2018 Microsoft</small>
</p>
</footer>

File diff suppressed because it is too large Load diff

View file

@ -6,7 +6,7 @@ var editor = monaco.editor.create(document.getElementById("container"), {
value: "// First line\nfunction hello() {\n\talert('Hello world!');\n}\n// Last line",
language: "javascript",
lineNumbers: false,
lineNumbers: "off",
roundedSelection: false,
scrollBeyondLastLine: false,
readOnly: false,
@ -14,6 +14,6 @@ var editor = monaco.editor.create(document.getElementById("container"), {
});
setTimeout(function() {
editor.updateOptions({
lineNumbers: true
lineNumbers: "on"
});
}, 2000);

View file

@ -28,7 +28,8 @@ monaco.languages.registerCompletionItemProvider('json', {
provideCompletionItems: function(model, position) {
// 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 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 [];

View file

@ -1,8 +1,12 @@
// Configures two JSON schemas, with references.
var id = "foo.json";
monaco.languages.json.jsonDefaults.setDiagnosticsOptions({
validate: true,
schemas: [{
uri: "http://myserver/foo-schema.json",
fileMatch: [id],
schema: {
type: "object",
properties: {
@ -16,6 +20,7 @@ monaco.languages.json.jsonDefaults.setDiagnosticsOptions({
}
},{
uri: "http://myserver/bar-schema.json",
fileMatch: [id],
schema: {
type: "object",
properties: {
@ -30,11 +35,13 @@ monaco.languages.json.jsonDefaults.setDiagnosticsOptions({
var jsonCode = [
'{',
' "$schema": "http://myserver/foo-schema.json"',
' "p1": "v3",',
' "p2": false',
"}"
].join('\n');
var model = monaco.editor.createModel(jsonCode, "json", id);
monaco.editor.create(document.getElementById("container"), {
value: jsonCode,
language: "json"
});
model: model
});