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:
parent
f3518cddbe
commit
6720fd1f0e
@ -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) => {
|
||||
|
@ -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 = {};
|
||||
|
Loading…
Reference in New Issue
Block a user