@codingame/monaco-vscode-welcome-service-override 3.1.2 → 3.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-welcome-service-override",
|
|
3
|
-
"version": "3.1
|
|
3
|
+
"version": "3.2.1",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -18,7 +18,6 @@
|
|
|
18
18
|
"module": "index.js",
|
|
19
19
|
"types": "index.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"vscode": "npm:@codingame/monaco-vscode-api@3.1
|
|
22
|
-
"vscode-marked": "npm:marked@=3.0.2"
|
|
21
|
+
"vscode": "npm:@codingame/monaco-vscode-api@3.2.1"
|
|
23
22
|
}
|
|
24
23
|
}
|
|
@@ -2,7 +2,7 @@ import { __decorate, __param } from '../../../../../../../external/tslib/tslib.e
|
|
|
2
2
|
import { EditorInput } from 'vscode/vscode/vs/workbench/common/editor/editorInput';
|
|
3
3
|
import { EditorModel } from 'vscode/vscode/vs/workbench/common/editor/editorModel';
|
|
4
4
|
import { ITextModelService } from 'vscode/vscode/vs/editor/common/services/resolverService';
|
|
5
|
-
import
|
|
5
|
+
import marked_1 from '../../../../../../../external/vscode-marked/lib/marked.esm.js';
|
|
6
6
|
import { isEqual } from 'vscode/vscode/vs/base/common/resources';
|
|
7
7
|
import { requireToContent } from '../common/walkThroughContentProvider.js';
|
|
8
8
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
@@ -72,14 +72,14 @@ let WalkThroughInput = WalkThroughInput_1 = class WalkThroughInput extends Edito
|
|
|
72
72
|
}
|
|
73
73
|
const snippets = [];
|
|
74
74
|
let i = 0;
|
|
75
|
-
const renderer = new
|
|
75
|
+
const renderer = new marked_1.Renderer();
|
|
76
76
|
renderer.code = (code, lang) => {
|
|
77
77
|
i++;
|
|
78
78
|
const resource = this.options.resource.with({ scheme: Schemas.walkThroughSnippet, fragment: `${i}.${lang}` });
|
|
79
79
|
snippets.push(this.textModelResolverService.createModelReference(resource));
|
|
80
80
|
return `<div id="snippet-${resource.fragment}" class="walkThroughEditorContainer" ></div>`;
|
|
81
81
|
};
|
|
82
|
-
content =
|
|
82
|
+
content = marked_1(content, { renderer });
|
|
83
83
|
return Promise.all(snippets)
|
|
84
84
|
.then(refs => ( new WalkThroughModel(content, refs)));
|
|
85
85
|
});
|
package/vscode/src/vs/workbench/contrib/welcomeWalkthrough/common/walkThroughContentProvider.js
CHANGED
|
@@ -2,7 +2,7 @@ import { __decorate, __param } from '../../../../../../../external/tslib/tslib.e
|
|
|
2
2
|
import { ITextModelService } from 'vscode/vscode/vs/editor/common/services/resolverService';
|
|
3
3
|
import { IModelService } from 'vscode/vscode/vs/editor/common/services/model';
|
|
4
4
|
import { ILanguageService } from 'vscode/vscode/vs/editor/common/languages/language';
|
|
5
|
-
import
|
|
5
|
+
import marked_1 from '../../../../../../../external/vscode-marked/lib/marked.esm.js';
|
|
6
6
|
import { Schemas, FileAccess } from 'vscode/vscode/vs/base/common/network';
|
|
7
7
|
import { Range } from 'vscode/vscode/vs/editor/common/core/range';
|
|
8
8
|
import { createTextBufferFactory } from 'vscode/vscode/vs/editor/common/model/textModel';
|
|
@@ -46,7 +46,7 @@ let WalkThroughSnippetContentProvider = class WalkThroughSnippetContentProvider
|
|
|
46
46
|
if (!codeEditorModel) {
|
|
47
47
|
const j = parseInt(resource.fragment);
|
|
48
48
|
let i = 0;
|
|
49
|
-
const renderer = new
|
|
49
|
+
const renderer = new marked_1.Renderer();
|
|
50
50
|
renderer.code = (code, lang) => {
|
|
51
51
|
i++;
|
|
52
52
|
const languageId = typeof lang === 'string' ? this.languageService.getLanguageIdByLanguageName(lang) || '' : '';
|
|
@@ -61,7 +61,7 @@ let WalkThroughSnippetContentProvider = class WalkThroughSnippetContentProvider
|
|
|
61
61
|
const lineCount = textBuffer.getLineCount();
|
|
62
62
|
const range = ( new Range(1, 1, lineCount, textBuffer.getLineLength(lineCount) + 1));
|
|
63
63
|
const markdown = textBuffer.getValueInRange(range, 0 );
|
|
64
|
-
|
|
64
|
+
marked_1(markdown, { renderer });
|
|
65
65
|
}
|
|
66
66
|
return assertIsDefined(codeEditorModel);
|
|
67
67
|
}
|