Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/extensions/markdown-language-features/preview-src/strings.ts
3292 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
export function getStrings(): { [key: string]: string } {
7
const store = document.getElementById('vscode-markdown-preview-data');
8
if (store) {
9
const data = store.getAttribute('data-strings');
10
if (data) {
11
return JSON.parse(data);
12
}
13
}
14
throw new Error('Could not load strings');
15
}
16
17