mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
Add markdown emoji for testing in notebooks
This commit is contained in:
parent
b22f8f1169
commit
b3a33306fb
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
20
extensions/notebook-markdown-extensions/notebook/emoji.ts
Normal file
20
extensions/notebook-markdown-extensions/notebook/emoji.ts
Normal file
|
@ -0,0 +1,20 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import type * as markdownIt from 'markdown-it';
|
||||
|
||||
declare const extendMarkdownIt: undefined | (
|
||||
(f: (md: markdownIt.MarkdownIt) => void) => void
|
||||
);
|
||||
|
||||
(function () {
|
||||
if (typeof extendMarkdownIt !== 'undefined') {
|
||||
const emoji = require('markdown-it-emoji');
|
||||
|
||||
extendMarkdownIt((md: markdownIt.MarkdownIt) => {
|
||||
md.use(emoji);
|
||||
});
|
||||
}
|
||||
}());
|
||||
|
|
@ -12,11 +12,10 @@ declare const extendMarkdownIt: undefined | (
|
|||
|
||||
(function () {
|
||||
const katex = require('@iktakahiro/markdown-it-katex');
|
||||
|
||||
if (typeof extendMarkdownIt !== 'undefined') {
|
||||
|
||||
extendMarkdownIt((md: markdownIt.MarkdownIt) => {
|
||||
md.use(katex);
|
||||
});
|
||||
}
|
||||
}());
|
||||
|
|
@ -18,8 +18,13 @@
|
|||
"notebookMarkdownRenderer": [
|
||||
{
|
||||
"id": "markdownItRenderer-katex",
|
||||
"displayName": "Markdown it renderer",
|
||||
"entrypoint": "./notebook-out/extension.js"
|
||||
"displayName": "Markdown it katex renderer",
|
||||
"entrypoint": "./notebook-out/katex.js"
|
||||
},
|
||||
{
|
||||
"id": "markdownItRenderer-emoji",
|
||||
"displayName": "Markdown it emoji renderer",
|
||||
"entrypoint": "./notebook-out/emoji.js"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -29,7 +34,8 @@
|
|||
"build-notebook": "npx webpack-cli --config webpack.notebook.js --mode production"
|
||||
},
|
||||
"dependencies": {
|
||||
"@iktakahiro/markdown-it-katex": "^4.0.1"
|
||||
"@iktakahiro/markdown-it-katex": "^4.0.1",
|
||||
"markdown-it-emoji": "^2.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/markdown-it": "^0.0.0",
|
||||
|
|
|
@ -6,7 +6,8 @@ const path = require('path');
|
|||
|
||||
module.exports = {
|
||||
entry: {
|
||||
extension: './notebook/extension.ts',
|
||||
katex: './notebook/katex.ts',
|
||||
emoji: './notebook/emoji.ts',
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
|
|
|
@ -154,6 +154,11 @@ lru-cache@^6.0.0:
|
|||
dependencies:
|
||||
yallist "^4.0.0"
|
||||
|
||||
markdown-it-emoji@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/markdown-it-emoji/-/markdown-it-emoji-2.0.0.tgz#3164ad4c009efd946e98274f7562ad611089a231"
|
||||
integrity sha512-39j7/9vP/CPCKbEI44oV8yoPJTpvfeReTn/COgRhSpNrjWF3PfP/JUxxB0hxV6ynOY8KH8Y8aX9NMDdo6z+6YQ==
|
||||
|
||||
markdown-it@^12.0.4:
|
||||
version "12.0.4"
|
||||
resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-12.0.4.tgz#eec8247d296327eac3ba9746bdeec9cfcc751e33"
|
||||
|
|
Loading…
Reference in a new issue