1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Desktop: Fixes #9752: CodeMirror 6 plugin API: Allow importing @codemirror/lang-markdown and @lezer/highlight (#9753)

This commit is contained in:
Henry Heino 2024-01-22 07:28:00 -08:00 committed by GitHub
parent f3518cddbe
commit 6720fd1f0e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 3 deletions

View File

@ -5,11 +5,14 @@ import * as codeMirrorLanguage from '@codemirror/language';
import * as codeMirrorAutocomplete from '@codemirror/autocomplete';
import * as codeMirrorCommands from '@codemirror/commands';
import * as codeMirrorLint from '@codemirror/lint';
import * as codeMirrorLangHtml from '@codemirror/lang-html';
import * as codeMirrorLangMarkdown from '@codemirror/lang-markdown';
import * as codeMirrorLanguageData from '@codemirror/language-data';
import * as lezerHighlight from '@lezer/highlight';
import * as lezerCommon from '@lezer/common';
import * as lezerMarkdown from '@lezer/markdown';
import * as codeMirrorLangHtml from '@codemirror/lang-html';
import * as codeMirrorLanguageData from '@codemirror/language-data';
// Exposes CodeMirror libraries to plugins.
//
@ -21,12 +24,14 @@ const libraryNameToPackage: Record<string, any> = {
'@codemirror/language': codeMirrorLanguage,
'@codemirror/autocomplete': codeMirrorAutocomplete,
'@codemirror/commands': codeMirrorCommands,
'@codemirror/highlight': lezerHighlight,
'@codemirror/lint': codeMirrorLint,
'@codemirror/lang-html': codeMirrorLangHtml,
'@codemirror/lang-markdown': codeMirrorLangMarkdown,
'@codemirror/language-data': codeMirrorLanguageData,
'@lezer/common': lezerCommon,
'@lezer/markdown': lezerMarkdown,
'@lezer/highlight': lezerHighlight,
};
const codeMirrorRequire = (library: string) => {

View File

@ -227,9 +227,11 @@ const externalContentScriptLibraries = [
'@codemirror/highlight',
'@codemirror/lint',
'@codemirror/lang-html',
'@codemirror/lang-markdown',
'@codemirror/language-data',
'@lezer/common',
'@lezer/markdown',
'@lezer/highlight',
];
const extraScriptExternals = {};