From 5eb0cda8b9c1d27569eb1c350de3df41a5c82ba9 Mon Sep 17 00:00:00 2001 From: Henry Heino <46334387+personalizedrefrigerator@users.noreply.github.com> Date: Wed, 20 Dec 2023 11:10:20 -0800 Subject: [PATCH] Desktop,Mobile: Resolves #9562: CodeMirror 6 markdown editor: Support highlighting more languages (#9563) --- packages/app-mobile/package.json | 1 - .../markdown/markdownReformatter.test.ts | 25 +- .../markdown/syntaxHighlightingLanguages.ts | 243 +---------- .../CodeMirror/pluginApi/codeMirrorRequire.ts | 2 + packages/editor/CodeMirror/theme.ts | 9 + packages/editor/package.json | 30 +- .../app/templates/webpack.config.js | 1 + yarn.lock | 389 ++++++++++++------ 8 files changed, 319 insertions(+), 381 deletions(-) diff --git a/packages/app-mobile/package.json b/packages/app-mobile/package.json index bf593ce41..f2b5c5b88 100644 --- a/packages/app-mobile/package.json +++ b/packages/app-mobile/package.json @@ -89,7 +89,6 @@ "@babel/runtime": "7.20.0", "@joplin/tools": "~2.14", "@js-draw/material-icons": "1.14.0", - "@lezer/highlight": "1.1.4", "@testing-library/jest-native": "5.4.3", "@testing-library/react-native": "12.3.3", "@tsconfig/react-native": "2.0.2", diff --git a/packages/editor/CodeMirror/markdown/markdownReformatter.test.ts b/packages/editor/CodeMirror/markdown/markdownReformatter.test.ts index 1d5ee9eca..58ac44c25 100644 --- a/packages/editor/CodeMirror/markdown/markdownReformatter.test.ts +++ b/packages/editor/CodeMirror/markdown/markdownReformatter.test.ts @@ -144,34 +144,24 @@ describe('markdownReformatter', () => { expect(tabsToSpaces(state, ' \t ')).toBe(' '); }); - it('should correctly renumber a list with multiple selections', async () => { - const firstListText = [ + it('should correctly renumber a list with multiple selections in that list', async () => { + const listText = [ '1. This', '\t2. is', '\t3. a', '4. test', - '', - '', - ].join('\n'); - - const secondListText = [ - '## List 2', - '', - '1. Test', - '\t2. 2', ].join('\n'); const editor = await createTestEditor( - `${firstListText}${secondListText}\n\n# End`, - EditorSelection.cursor(firstListText.length + secondListText.length), + `${listText}\n\n# End`, + EditorSelection.cursor(listText.length), ['OrderedList', 'ATXHeading1', 'ATXHeading2'], ); - // Include a selection twice in the same list -- previously, + // Include a selection twice in the same list const initialSelection = EditorSelection.create([ EditorSelection.cursor('1. This\n2.'.length), // Middle of second line EditorSelection.cursor('1. This\n2. is\n3'.length), // Beginning of third line - EditorSelection.cursor(firstListText.length + secondListText.length - 1), // End ]); editor.dispatch({ @@ -186,11 +176,6 @@ describe('markdownReformatter', () => { '\t2. a', '2. test', '', - '## List 2', - '', - '1. Test', - '\t1. 2', - '', '# End', ].join('\n')); }); diff --git a/packages/editor/CodeMirror/markdown/syntaxHighlightingLanguages.ts b/packages/editor/CodeMirror/markdown/syntaxHighlightingLanguages.ts index aa2d85f94..69bd37a21 100644 --- a/packages/editor/CodeMirror/markdown/syntaxHighlightingLanguages.ts +++ b/packages/editor/CodeMirror/markdown/syntaxHighlightingLanguages.ts @@ -2,235 +2,34 @@ // Exports a list of languages that can be used in fenced code blocks. // -import { LanguageDescription, LanguageSupport, StreamParser } from '@codemirror/language'; -import { StreamLanguage } from '@codemirror/language'; +import { LanguageDescription } from '@codemirror/language'; +import { languages } from '@codemirror/language-data'; -import { python } from '@codemirror/legacy-modes/mode/python'; -import { c, dart } from '@codemirror/legacy-modes/mode/clike'; -import { lua } from '@codemirror/legacy-modes/mode/lua'; -import { r } from '@codemirror/legacy-modes/mode/r'; -import { ruby } from '@codemirror/legacy-modes/mode/ruby'; -import { swift } from '@codemirror/legacy-modes/mode/swift'; -import { go } from '@codemirror/legacy-modes/mode/go'; -import { vb } from '@codemirror/legacy-modes/mode/vb'; -import { vbScript } from '@codemirror/legacy-modes/mode/vbscript'; -import { css } from '@codemirror/legacy-modes/mode/css'; -import { stex } from '@codemirror/legacy-modes/mode/stex'; -import { groovy } from '@codemirror/legacy-modes/mode/groovy'; -import { perl } from '@codemirror/legacy-modes/mode/perl'; -import { cobol } from '@codemirror/legacy-modes/mode/cobol'; -import { julia } from '@codemirror/legacy-modes/mode/julia'; -import { haskell } from '@codemirror/legacy-modes/mode/haskell'; -import { pascal } from '@codemirror/legacy-modes/mode/pascal'; -import { yaml } from '@codemirror/legacy-modes/mode/yaml'; -import { xml } from '@codemirror/legacy-modes/mode/xml'; -import { shell } from '@codemirror/legacy-modes/mode/shell'; -import { dockerFile } from '@codemirror/legacy-modes/mode/dockerfile'; -import { diff } from '@codemirror/legacy-modes/mode/diff'; -import { erlang } from '@codemirror/legacy-modes/mode/erlang'; -import { sqlite, standardSQL, mySQL } from '@codemirror/legacy-modes/mode/sql'; - -import { javascript } from '@codemirror/lang-javascript'; -import { markdown } from '@codemirror/lang-markdown'; -import { html } from '@codemirror/lang-html'; -import { cpp } from '@codemirror/lang-cpp'; -import { php } from '@codemirror/lang-php'; -import { java } from '@codemirror/lang-java'; -import { rust } from '@codemirror/lang-rust'; - -const supportedLanguages: { - name: string; - aliases?: string[]; - - // Either support or parser must be given - parser?: StreamParser; - support?: LanguageSupport; -}[] = [ - // Based on @joplin/desktop/CodeMirror/Editor.tsx - - { - name: 'LaTeX', - aliases: ['tex', 'latex', 'luatex'], - parser: stex, - }, - { - name: 'python', - aliases: ['py'], - parser: python, - }, - { - name: 'clike', - aliases: ['c', 'h'], - parser: c, - }, - { - name: 'C++', - aliases: ['cpp', 'hpp', 'cxx', 'hxx', 'c++'], - support: cpp(), - }, - { - name: 'java', - support: java(), - }, - { - name: 'javascript', - aliases: ['js', 'mjs'], - support: javascript(), - }, - { - name: 'typescript', - aliases: ['ts'], - support: javascript({ jsx: false, typescript: true }), - }, - { - name: 'react javascript', - aliases: ['jsx'], - support: javascript({ jsx: true, typescript: false }), - }, - { - name: 'react typescript', - aliases: ['tsx'], - support: javascript({ jsx: true, typescript: true }), - }, - { - name: 'lua', - parser: lua, - }, - { - name: 'php', - support: php(), - }, - { - name: 'r', - parser: r, - }, - { - name: 'swift', - parser: swift, - }, - { - name: 'go', - parser: go, - }, - { - name: 'visualbasic', - aliases: ['vb'], - parser: vb, - }, - { - name: 'visualbasicscript', - aliases: ['vbscript', 'vbs'], - parser: vbScript, - }, - { - name: 'ruby', - aliases: ['rb'], - parser: ruby, - }, - { - name: 'rust', - aliases: ['rs'], - support: rust(), - }, - { - name: 'dart', - parser: dart, - }, - { - name: 'groovy', - parser: groovy, - }, - { - name: 'perl', - aliases: ['pl'], - parser: perl, - }, - { - name: 'cobol', - aliases: ['cbl', 'cob'], - parser: cobol, - }, - { - name: 'julia', - aliases: ['jl'], - parser: julia, - }, - { - name: 'haskell', - aliases: ['hs'], - parser: haskell, - }, - { - name: 'pascal', - parser: pascal, - }, - { - name: 'css', - parser: css, - }, - { - name: 'xml', - aliases: ['xhtml'], - parser: xml, - }, - { - name: 'html', - aliases: ['html', 'htm'], - support: html(), - }, - { - name: 'markdown', - support: markdown(), - }, - { - name: 'yaml', - parser: yaml, - }, - { - name: 'shell', - aliases: ['bash', 'sh', 'zsh', 'dash'], - parser: shell, - }, - { - name: 'dockerfile', - parser: dockerFile, - }, - { - name: 'diff', - parser: diff, - }, - { - name: 'erlang', - parser: erlang, - }, - { - name: 'sql', - parser: standardSQL, - }, - { - name: 'sqlite', - parser: sqlite, - }, - { - name: 'mysql', - parser: mySQL, - }, -]; +const additionalAliases: Record = { + 'python': ['py'], + 'rust': ['rs'], + 'markdown': ['md'], +}; // Convert supportedLanguages to a CodeMirror-readable list // of LanguageDescriptions const syntaxHighlightingLanguages: LanguageDescription[] = []; -for (const language of supportedLanguages) { - // Convert from parsers to LanguageSupport objects as necessary - const support = language.support ?? new LanguageSupport(StreamLanguage.define(language.parser)); - syntaxHighlightingLanguages.push( - LanguageDescription.of({ +for (const language of languages) { + const languageId = language.name.toLowerCase(); + + if (additionalAliases.hasOwnProperty(languageId)) { + syntaxHighlightingLanguages.push(LanguageDescription.of({ name: language.name, - alias: language.aliases, - support, - }), - ); + alias: [...language.alias, ...additionalAliases[languageId]], + extensions: language.extensions, + filename: language.filename, + support: language.support, + load: () => language.load.call(language), + })); + } else { + syntaxHighlightingLanguages.push(language); + } } export default syntaxHighlightingLanguages; diff --git a/packages/editor/CodeMirror/pluginApi/codeMirrorRequire.ts b/packages/editor/CodeMirror/pluginApi/codeMirrorRequire.ts index db7364f55..531d3a6f2 100644 --- a/packages/editor/CodeMirror/pluginApi/codeMirrorRequire.ts +++ b/packages/editor/CodeMirror/pluginApi/codeMirrorRequire.ts @@ -9,6 +9,7 @@ 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. // @@ -23,6 +24,7 @@ const libraryNameToPackage: Record = { '@codemirror/highlight': lezerHighlight, '@codemirror/lint': codeMirrorLint, '@codemirror/lang-html': codeMirrorLangHtml, + '@codemirror/language-data': codeMirrorLanguageData, '@lezer/common': lezerCommon, '@lezer/markdown': lezerMarkdown, }; diff --git a/packages/editor/CodeMirror/theme.ts b/packages/editor/CodeMirror/theme.ts index 30dbcadf5..c80851c80 100644 --- a/packages/editor/CodeMirror/theme.ts +++ b/packages/editor/CodeMirror/theme.ts @@ -276,6 +276,15 @@ const createTheme = (theme: EditorTheme): Extension[] => { tag: tags.deleted, color: isDarkTheme ? '#f96' : '#a21', }, + { + tag: tags.propertyName, + color: isDarkTheme ? '#d96' : '#940', + }, + { + // CSS class names (and class names in other languages) + tag: tags.className, + color: isDarkTheme ? '#d8a' : '#904', + }, ]); return [ diff --git a/packages/editor/package.json b/packages/editor/package.json index 71fd9b125..26bf76673 100644 --- a/packages/editor/package.json +++ b/packages/editor/package.json @@ -26,24 +26,20 @@ "typescript": "5.2.2" }, "dependencies": { - "@codemirror/autocomplete": "6.10.2", - "@codemirror/commands": "6.2.5", - "@codemirror/lang-cpp": "6.0.2", - "@codemirror/lang-html": "6.4.6", - "@codemirror/lang-java": "6.0.1", - "@codemirror/lang-javascript": "6.2.1", - "@codemirror/lang-markdown": "6.2.1", - "@codemirror/lang-php": "6.0.1", - "@codemirror/lang-rust": "6.0.1", - "@codemirror/language": "6.9.0", + "@codemirror/autocomplete": "6.11.1", + "@codemirror/commands": "6.3.2", + "@codemirror/lang-html": "6.4.7", + "@codemirror/lang-markdown": "6.2.3", + "@codemirror/language": "6.9.3", + "@codemirror/language-data": "6.3.1", "@codemirror/legacy-modes": "6.3.3", - "@codemirror/lint": "6.4.1", - "@codemirror/search": "6.5.2", - "@codemirror/state": "6.2.1", - "@codemirror/view": "6.18.0", - "@lezer/common": "1.0.4", - "@lezer/highlight": "1.1.6", - "@lezer/markdown": "1.1.0", + "@codemirror/lint": "6.4.2", + "@codemirror/search": "6.5.5", + "@codemirror/state": "6.3.3", + "@codemirror/view": "6.22.3", + "@lezer/common": "1.1.2", + "@lezer/highlight": "1.2.0", + "@lezer/markdown": "1.1.2", "@replit/codemirror-vim": "6.0.14" } } diff --git a/packages/generator-joplin/generators/app/templates/webpack.config.js b/packages/generator-joplin/generators/app/templates/webpack.config.js index 525fcf2d4..f58fa9142 100644 --- a/packages/generator-joplin/generators/app/templates/webpack.config.js +++ b/packages/generator-joplin/generators/app/templates/webpack.config.js @@ -227,6 +227,7 @@ const externalContentScriptLibraries = [ '@codemirror/highlight', '@codemirror/lint', '@codemirror/lang-html', + '@codemirror/language-data', '@lezer/common', '@lezer/markdown', ]; diff --git a/yarn.lock b/yarn.lock index 7c1f65de5..f1da98f7e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3964,9 +3964,9 @@ __metadata: languageName: node linkType: hard -"@codemirror/autocomplete@npm:6.10.2": - version: 6.10.2 - resolution: "@codemirror/autocomplete@npm:6.10.2" +"@codemirror/autocomplete@npm:6.11.1, @codemirror/autocomplete@npm:^6.0.0, @codemirror/autocomplete@npm:^6.3.2, @codemirror/autocomplete@npm:^6.7.1": + version: 6.11.1 + resolution: "@codemirror/autocomplete@npm:6.11.1" dependencies: "@codemirror/language": ^6.0.0 "@codemirror/state": ^6.0.0 @@ -3977,40 +3977,37 @@ __metadata: "@codemirror/state": ^6.0.0 "@codemirror/view": ^6.0.0 "@lezer/common": ^1.0.0 - checksum: 360cea6a87ae9c4e3c996903f636a8f47f8ea6cd44504181e69dd8ccf666bad3e8cc6d8935e0eedd8aa118fdfe86ea78f41bc15288f3a7517dbb87115e057563 + checksum: 69cb77d51dbc4c76a990fb8e562075d6fa11b2aef00fce33d2a98dd701f6a89050b1b464ae8ee1e2cbe1a4210522b1a3c2260cdf5c933a062093acaf98a5eedc languageName: node linkType: hard -"@codemirror/autocomplete@npm:^6.0.0, @codemirror/autocomplete@npm:^6.7.1": - version: 6.9.0 - resolution: "@codemirror/autocomplete@npm:6.9.0" - dependencies: - "@codemirror/language": ^6.0.0 - "@codemirror/state": ^6.0.0 - "@codemirror/view": ^6.6.0 - "@lezer/common": ^1.0.0 - peerDependencies: - "@codemirror/language": ^6.0.0 - "@codemirror/state": ^6.0.0 - "@codemirror/view": ^6.0.0 - "@lezer/common": ^1.0.0 - checksum: a5f661944c75f40b02c90a193c9a459c0fd7e335c0ac5973420c19157dfb46010f573c2b70731591fe477e7a2ad10121ff3ae394a72d450946d7b886c28b0368 - languageName: node - linkType: hard - -"@codemirror/commands@npm:6.2.5": - version: 6.2.5 - resolution: "@codemirror/commands@npm:6.2.5" +"@codemirror/commands@npm:6.3.2": + version: 6.3.2 + resolution: "@codemirror/commands@npm:6.3.2" dependencies: "@codemirror/language": ^6.0.0 "@codemirror/state": ^6.2.0 "@codemirror/view": ^6.0.0 - "@lezer/common": ^1.0.0 - checksum: 6d373bcfd4337160243e1493c8703a8e367e208811742331679a6410a3645de36ae8a5664e11790fec521137b45f34d703e9292932a98c4de10139510f3f29a3 + "@lezer/common": ^1.1.0 + checksum: 683c444d8e6ad889ab5efd0d742b0fa28b78c8cad63276ec60d298b13d4939c8bd7e1d6fd3535645b8d255147de0d3aef46d89a29c19d0af58a7f2914bdcb3ab languageName: node linkType: hard -"@codemirror/lang-cpp@npm:6.0.2": +"@codemirror/lang-angular@npm:^0.1.0": + version: 0.1.2 + resolution: "@codemirror/lang-angular@npm:0.1.2" + dependencies: + "@codemirror/lang-html": ^6.0.0 + "@codemirror/lang-javascript": ^6.1.2 + "@codemirror/language": ^6.0.0 + "@lezer/common": ^1.0.0 + "@lezer/highlight": ^1.0.0 + "@lezer/lr": ^1.3.3 + checksum: 5c270439dffc846153a210a1f6a74083f6d1bdf8daad8d3a26c58fc46fb0633c17e6e6f7a811e7a6651e7460cb7a95c1ea729fc6d626c25a890fbad44393c8e7 + languageName: node + linkType: hard + +"@codemirror/lang-cpp@npm:^6.0.0": version: 6.0.2 resolution: "@codemirror/lang-cpp@npm:6.0.2" dependencies: @@ -4020,7 +4017,7 @@ __metadata: languageName: node linkType: hard -"@codemirror/lang-css@npm:^6.0.0": +"@codemirror/lang-css@npm:^6.0.0, @codemirror/lang-css@npm:^6.2.0": version: 6.2.1 resolution: "@codemirror/lang-css@npm:6.2.1" dependencies: @@ -4033,9 +4030,9 @@ __metadata: languageName: node linkType: hard -"@codemirror/lang-html@npm:6.4.6, @codemirror/lang-html@npm:^6.0.0": - version: 6.4.6 - resolution: "@codemirror/lang-html@npm:6.4.6" +"@codemirror/lang-html@npm:6.4.7, @codemirror/lang-html@npm:^6.0.0": + version: 6.4.7 + resolution: "@codemirror/lang-html@npm:6.4.7" dependencies: "@codemirror/autocomplete": ^6.0.0 "@codemirror/lang-css": ^6.0.0 @@ -4046,11 +4043,11 @@ __metadata: "@lezer/common": ^1.0.0 "@lezer/css": ^1.1.0 "@lezer/html": ^1.3.0 - checksum: 8f884f4423ffc783181ee933f7212ad4ece204695cf8af9535a593f95e901d36515a8561fc336a0fbcf5782369b9484eeb0d2cec2167622868238177c5e6eb36 + checksum: 26e3d9243bd8dea2c0f7769315f8ed4b77969497f52c545c84ff32f155489b3a29e476aa78ffc11e910a0f927bbebce4d28f4e17e1994f6c9d8df6bdd3c33ef1 languageName: node linkType: hard -"@codemirror/lang-java@npm:6.0.1": +"@codemirror/lang-java@npm:^6.0.0": version: 6.0.1 resolution: "@codemirror/lang-java@npm:6.0.1" dependencies: @@ -4060,7 +4057,7 @@ __metadata: languageName: node linkType: hard -"@codemirror/lang-javascript@npm:6.2.1, @codemirror/lang-javascript@npm:^6.0.0": +"@codemirror/lang-javascript@npm:^6.0.0, @codemirror/lang-javascript@npm:^6.1.2": version: 6.2.1 resolution: "@codemirror/lang-javascript@npm:6.2.1" dependencies: @@ -4075,9 +4072,31 @@ __metadata: languageName: node linkType: hard -"@codemirror/lang-markdown@npm:6.2.1": - version: 6.2.1 - resolution: "@codemirror/lang-markdown@npm:6.2.1" +"@codemirror/lang-json@npm:^6.0.0": + version: 6.0.1 + resolution: "@codemirror/lang-json@npm:6.0.1" + dependencies: + "@codemirror/language": ^6.0.0 + "@lezer/json": ^1.0.0 + checksum: e9e87d50ff7b81bd56a6ab50740b1dd54e9a93f1be585e1d59d0642e2148842ea1528ac7b7221eb4ddc7fe84bbc28065144cc3ab86f6e06c6aeb2d4b4e62acf1 + languageName: node + linkType: hard + +"@codemirror/lang-less@npm:^6.0.0": + version: 6.0.1 + resolution: "@codemirror/lang-less@npm:6.0.1" + dependencies: + "@codemirror/lang-css": ^6.2.0 + "@codemirror/language": ^6.0.0 + "@lezer/highlight": ^1.0.0 + "@lezer/lr": ^1.0.0 + checksum: a50c7fca04777ca4dab7f0d44d89e1e345ca3451653f4002be331fbdea8d204b3f2cb29619a4a47417213206fd3764d5f2cdaaafd2baf1e3b504d8a418ff9fce + languageName: node + linkType: hard + +"@codemirror/lang-markdown@npm:6.2.3, @codemirror/lang-markdown@npm:^6.0.0": + version: 6.2.3 + resolution: "@codemirror/lang-markdown@npm:6.2.3" dependencies: "@codemirror/autocomplete": ^6.7.1 "@codemirror/lang-html": ^6.0.0 @@ -4086,11 +4105,11 @@ __metadata: "@codemirror/view": ^6.0.0 "@lezer/common": ^1.0.0 "@lezer/markdown": ^1.0.0 - checksum: ef3bdfd01e418efc7f7fdf0baa2e8e91875b37f870fcad98f846954763c7cc71bac95736591cd6c52b39cc380261d76ae7b37ca97ef1641c4c266476748046d3 + checksum: 9b9e13cca288c36c68ad7e2cc5058cb4da2232e74479124c4952ecd2310d2e91f182c606414680570218119ceae99bdab6540dce081ce564030c9e4cadc96a64 languageName: node linkType: hard -"@codemirror/lang-php@npm:6.0.1": +"@codemirror/lang-php@npm:^6.0.0": version: 6.0.1 resolution: "@codemirror/lang-php@npm:6.0.1" dependencies: @@ -4103,7 +4122,18 @@ __metadata: languageName: node linkType: hard -"@codemirror/lang-rust@npm:6.0.1": +"@codemirror/lang-python@npm:^6.0.0": + version: 6.1.3 + resolution: "@codemirror/lang-python@npm:6.1.3" + dependencies: + "@codemirror/autocomplete": ^6.3.2 + "@codemirror/language": ^6.8.0 + "@lezer/python": ^1.1.4 + checksum: 65a0276a4503e4e3b70dd28d1c93ef472632b6d2c4bf3ae92d305d14ee8cf60b0bbbf62d5ceb51294de9598d9e2d42eafcde26f317ee7b90d0a11dfa863c1d1a + languageName: node + linkType: hard + +"@codemirror/lang-rust@npm:^6.0.0": version: 6.0.1 resolution: "@codemirror/lang-rust@npm:6.0.1" dependencies: @@ -4113,21 +4143,112 @@ __metadata: languageName: node linkType: hard -"@codemirror/language@npm:6.9.0, @codemirror/language@npm:^6.0.0, @codemirror/language@npm:^6.3.0, @codemirror/language@npm:^6.4.0, @codemirror/language@npm:^6.6.0": - version: 6.9.0 - resolution: "@codemirror/language@npm:6.9.0" +"@codemirror/lang-sass@npm:^6.0.0": + version: 6.0.2 + resolution: "@codemirror/lang-sass@npm:6.0.2" dependencies: + "@codemirror/lang-css": ^6.2.0 + "@codemirror/language": ^6.0.0 "@codemirror/state": ^6.0.0 - "@codemirror/view": ^6.0.0 - "@lezer/common": ^1.0.0 - "@lezer/highlight": ^1.0.0 - "@lezer/lr": ^1.0.0 - style-mod: ^4.0.0 - checksum: 9a897fb0f569159eeafb7dce83061b425af7244bbeae2649e0e677488548b2a02eaf0c13c0c5b4d59da55e8866e6f4dc7abe3dfaa09c13749a2fa2c0dbc0c565 + "@lezer/common": ^1.0.2 + "@lezer/sass": ^1.0.0 + checksum: e7665aaab70476a952522b143fd7bd59f6c025746cbf7b542f6965f94eecac483b4afd03f6da98aaa1572e379194309b241c5264eff05c681c637aa26651b9ab languageName: node linkType: hard -"@codemirror/legacy-modes@npm:6.3.3": +"@codemirror/lang-sql@npm:^6.0.0": + version: 6.5.4 + resolution: "@codemirror/lang-sql@npm:6.5.4" + dependencies: + "@codemirror/autocomplete": ^6.0.0 + "@codemirror/language": ^6.0.0 + "@codemirror/state": ^6.0.0 + "@lezer/highlight": ^1.0.0 + "@lezer/lr": ^1.0.0 + checksum: face21b0231ac5a7981949b5bf6a99ed092d0d6f7eb83f35dcd31d56ecf07dafa19d21623e0bad36cec7a12e3149df7b45c3588aeee31eae41e9b05942c4fdd7 + languageName: node + linkType: hard + +"@codemirror/lang-vue@npm:^0.1.1": + version: 0.1.2 + resolution: "@codemirror/lang-vue@npm:0.1.2" + dependencies: + "@codemirror/lang-html": ^6.0.0 + "@codemirror/lang-javascript": ^6.1.2 + "@codemirror/language": ^6.0.0 + "@lezer/common": ^1.0.0 + "@lezer/highlight": ^1.0.0 + "@lezer/lr": ^1.3.1 + checksum: c283cc8f62471759a874601c2e9d5679690d67ad67bf6f1835b1a6c6b26d75861c35abb667e4460438e616f9557e4c48950d396419c8b140f9a3796e7d591908 + languageName: node + linkType: hard + +"@codemirror/lang-wast@npm:^6.0.0": + version: 6.0.1 + resolution: "@codemirror/lang-wast@npm:6.0.1" + dependencies: + "@codemirror/language": ^6.0.0 + "@lezer/highlight": ^1.0.0 + "@lezer/lr": ^1.0.0 + checksum: 600d98d3ea6a4e99292244ed707e39a2abd9f3abf62cfeff5c819a0cc0c7e86b8c5b91e91c1b7ea21233d9ea09c41abe61d8a40b2547bb5db74239c6df857934 + languageName: node + linkType: hard + +"@codemirror/lang-xml@npm:^6.0.0": + version: 6.0.2 + resolution: "@codemirror/lang-xml@npm:6.0.2" + dependencies: + "@codemirror/autocomplete": ^6.0.0 + "@codemirror/language": ^6.4.0 + "@codemirror/state": ^6.0.0 + "@lezer/common": ^1.0.0 + "@lezer/xml": ^1.0.0 + checksum: e156ecafaa87e9b6ef4ab6812ccd00d8f3c6cb81f232837636b36336d80513b61936dfee6f4f6800574f236208b61e95a2abcb997cdcd7366585a6b796e0e13b + languageName: node + linkType: hard + +"@codemirror/language-data@npm:6.3.1": + version: 6.3.1 + resolution: "@codemirror/language-data@npm:6.3.1" + dependencies: + "@codemirror/lang-angular": ^0.1.0 + "@codemirror/lang-cpp": ^6.0.0 + "@codemirror/lang-css": ^6.0.0 + "@codemirror/lang-html": ^6.0.0 + "@codemirror/lang-java": ^6.0.0 + "@codemirror/lang-javascript": ^6.0.0 + "@codemirror/lang-json": ^6.0.0 + "@codemirror/lang-less": ^6.0.0 + "@codemirror/lang-markdown": ^6.0.0 + "@codemirror/lang-php": ^6.0.0 + "@codemirror/lang-python": ^6.0.0 + "@codemirror/lang-rust": ^6.0.0 + "@codemirror/lang-sass": ^6.0.0 + "@codemirror/lang-sql": ^6.0.0 + "@codemirror/lang-vue": ^0.1.1 + "@codemirror/lang-wast": ^6.0.0 + "@codemirror/lang-xml": ^6.0.0 + "@codemirror/language": ^6.0.0 + "@codemirror/legacy-modes": ^6.1.0 + checksum: 38e88edf4eccc7f3d0a2f23906c62dd4281914459a6c9d3967e8ee2351616b65737c7c132cf64e7c99dfa835bbb503ef44718710b2171838c567b6a285cb2938 + languageName: node + linkType: hard + +"@codemirror/language@npm:6.9.3, @codemirror/language@npm:^6.0.0, @codemirror/language@npm:^6.3.0, @codemirror/language@npm:^6.4.0, @codemirror/language@npm:^6.6.0, @codemirror/language@npm:^6.8.0": + version: 6.9.3 + resolution: "@codemirror/language@npm:6.9.3" + dependencies: + "@codemirror/state": ^6.0.0 + "@codemirror/view": ^6.0.0 + "@lezer/common": ^1.1.0 + "@lezer/highlight": ^1.0.0 + "@lezer/lr": ^1.0.0 + style-mod: ^4.0.0 + checksum: 774a40bc91c748d418a9a774161a5b083061124e4439bb753072bc657ec4c4784f595161c10c7c3935154b22291bf6dc74c9abe827033db32e217ac3963478f3 + languageName: node + linkType: hard + +"@codemirror/legacy-modes@npm:6.3.3, @codemirror/legacy-modes@npm:^6.1.0": version: 6.3.3 resolution: "@codemirror/legacy-modes@npm:6.3.3" dependencies: @@ -4136,43 +4257,43 @@ __metadata: languageName: node linkType: hard -"@codemirror/lint@npm:6.4.1, @codemirror/lint@npm:^6.0.0": - version: 6.4.1 - resolution: "@codemirror/lint@npm:6.4.1" +"@codemirror/lint@npm:6.4.2, @codemirror/lint@npm:^6.0.0": + version: 6.4.2 + resolution: "@codemirror/lint@npm:6.4.2" dependencies: "@codemirror/state": ^6.0.0 "@codemirror/view": ^6.0.0 crelt: ^1.0.5 - checksum: ac8120ca96b5ef57abd2705b2620c15c7449b5056bca87053480e244c6772863e1537387a863cfb784f9f2af2c8b30be78a31660d96a815672059085beb51fd5 + checksum: 5e699960c1b28dbaa584fe091a3201978907bf4b9e52810fb15d3ceaf310e38053435e0b594da0985266ae812039a5cd6c36023284a6f8568664bdca04db137f languageName: node linkType: hard -"@codemirror/search@npm:6.5.2": - version: 6.5.2 - resolution: "@codemirror/search@npm:6.5.2" +"@codemirror/search@npm:6.5.5": + version: 6.5.5 + resolution: "@codemirror/search@npm:6.5.5" dependencies: "@codemirror/state": ^6.0.0 "@codemirror/view": ^6.0.0 crelt: ^1.0.5 - checksum: bc535151277fda0a370ac496b9b0d5751fd91bd8e3eb29dafbfe6bf3125dc450a7e361ebc302f0ebc4193ac337bdf555ab3d5ec753dbb44452225618a5630dd3 + checksum: 825196ef63273494ba9a6153b01eda385edb65e77a1e49980dd3a28d4a692af1e9575e03e4b6c84f6fa2afe72217113ff4c50f58b20d13fe0d277cda5dd7dc81 languageName: node linkType: hard -"@codemirror/state@npm:6.2.1, @codemirror/state@npm:^6.0.0, @codemirror/state@npm:^6.1.4, @codemirror/state@npm:^6.2.0": - version: 6.2.1 - resolution: "@codemirror/state@npm:6.2.1" - checksum: d12a321d0471b264b9d3259042bff913a8b939e8d28d408ff452004538a71ca9d5329df3f8a1d8a9183f5b42a7ef5b200737bcab1065714f5ae8e0a5ba9d59d3 +"@codemirror/state@npm:6.3.3, @codemirror/state@npm:^6.0.0, @codemirror/state@npm:^6.1.4, @codemirror/state@npm:^6.2.0": + version: 6.3.3 + resolution: "@codemirror/state@npm:6.3.3" + checksum: 08b075c738cc29391519d3e9b60c4398e7f56ba344983ab9b2263c7ace17d3056e4dcbc2ff651fd49099b48c8b4dc8535404a2f94bd017827f5f90c1045a1b05 languageName: node linkType: hard -"@codemirror/view@npm:6.18.0, @codemirror/view@npm:^6.0.0, @codemirror/view@npm:^6.17.0, @codemirror/view@npm:^6.6.0": - version: 6.18.0 - resolution: "@codemirror/view@npm:6.18.0" +"@codemirror/view@npm:6.22.3, @codemirror/view@npm:^6.0.0, @codemirror/view@npm:^6.17.0": + version: 6.22.3 + resolution: "@codemirror/view@npm:6.22.3" dependencies: "@codemirror/state": ^6.1.4 style-mod: ^4.1.0 w3c-keyname: ^2.2.4 - checksum: 275bf5898e884297f16f73e4dff1b520a196a5f7724fbeda634a927e7f4036f6786e816b124505942de99800fb66c538307e8c08e55234ad57483f1a009e3d35 + checksum: 89d011afa87b754a4207d18393109c1972c9403762d288711e96c77f51c693a825431c8e35c26268a6eb0889f7184602080d8dcf27fa21354a87dff80636d971 languageName: node linkType: hard @@ -6487,7 +6608,6 @@ __metadata: "@joplin/tools": ~2.14 "@joplin/utils": ~2.14 "@js-draw/material-icons": 1.14.0 - "@lezer/highlight": 1.1.4 "@react-native-community/clipboard": 1.5.1 "@react-native-community/datetimepicker": 7.6.2 "@react-native-community/geolocation": 3.1.0 @@ -6615,25 +6735,21 @@ __metadata: version: 0.0.0-use.local resolution: "@joplin/editor@workspace:packages/editor" dependencies: - "@codemirror/autocomplete": 6.10.2 - "@codemirror/commands": 6.2.5 - "@codemirror/lang-cpp": 6.0.2 - "@codemirror/lang-html": 6.4.6 - "@codemirror/lang-java": 6.0.1 - "@codemirror/lang-javascript": 6.2.1 - "@codemirror/lang-markdown": 6.2.1 - "@codemirror/lang-php": 6.0.1 - "@codemirror/lang-rust": 6.0.1 - "@codemirror/language": 6.9.0 + "@codemirror/autocomplete": 6.11.1 + "@codemirror/commands": 6.3.2 + "@codemirror/lang-html": 6.4.7 + "@codemirror/lang-markdown": 6.2.3 + "@codemirror/language": 6.9.3 + "@codemirror/language-data": 6.3.1 "@codemirror/legacy-modes": 6.3.3 - "@codemirror/lint": 6.4.1 - "@codemirror/search": 6.5.2 - "@codemirror/state": 6.2.1 - "@codemirror/view": 6.18.0 + "@codemirror/lint": 6.4.2 + "@codemirror/search": 6.5.5 + "@codemirror/state": 6.3.3 + "@codemirror/view": 6.22.3 "@joplin/lib": ~2.14 - "@lezer/common": 1.0.4 - "@lezer/highlight": 1.1.6 - "@lezer/markdown": 1.1.0 + "@lezer/common": 1.1.2 + "@lezer/highlight": 1.2.0 + "@lezer/markdown": 1.1.2 "@replit/codemirror-vim": 6.0.14 "@testing-library/react-hooks": 8.0.1 "@types/jest": 29.5.8 @@ -8039,10 +8155,10 @@ __metadata: languageName: node linkType: hard -"@lezer/common@npm:1.0.4, @lezer/common@npm:^1.0.0, @lezer/common@npm:^1.0.2": - version: 1.0.4 - resolution: "@lezer/common@npm:1.0.4" - checksum: 0bea82da76e0b89afad4e5159d3add460022916352c47906ec67b26d6fe5ec9cb8e23df0e2bf0adef765ae78bed1706fc573a11506d01a80112a5b6dd317730c +"@lezer/common@npm:1.1.2, @lezer/common@npm:^1.0.0, @lezer/common@npm:^1.0.2, @lezer/common@npm:^1.1.0": + version: 1.1.2 + resolution: "@lezer/common@npm:1.1.2" + checksum: 2d08c67f467d9625eac1cd79618f964353b63305f17822067c9aa7586c4983bfeaa4e6712f0e5685cf1de679fda5d707a4389a0dd01337397757d2cde0b070ea languageName: node linkType: hard @@ -8057,80 +8173,81 @@ __metadata: linkType: hard "@lezer/css@npm:^1.0.0, @lezer/css@npm:^1.1.0": - version: 1.1.3 - resolution: "@lezer/css@npm:1.1.3" + version: 1.1.4 + resolution: "@lezer/css@npm:1.1.4" dependencies: "@lezer/highlight": ^1.0.0 "@lezer/lr": ^1.0.0 - checksum: c8069ef0a6751441d2dc9180f7ebfd7aeb35df0ca2f1a748a2f26203a9ef6cc30f17f3074e2b49520453eb39329dadfdbbb901c6d9d067dc955ceb58c1f8cc6a + checksum: 13ffe83e7aaf4213b6a86d01cd68ac02a22e96e9b8ac91368f5f79572cf5e494cee1dc039dc4ed331ba38754681d6013397d06d8c319f1fcb6852b5625eba055 languageName: node linkType: hard -"@lezer/highlight@npm:1.1.4": - version: 1.1.4 - resolution: "@lezer/highlight@npm:1.1.4" +"@lezer/highlight@npm:1.2.0, @lezer/highlight@npm:^1.0.0, @lezer/highlight@npm:^1.1.3": + version: 1.2.0 + resolution: "@lezer/highlight@npm:1.2.0" dependencies: "@lezer/common": ^1.0.0 - checksum: 30e848c02839bfcd9472fcd6e74d71cba12379cef38f27d0c6cab0e6831f92150cfc629d267a40cc31f84cf46ac0a935400163fdf931b2672c516bec29417485 - languageName: node - linkType: hard - -"@lezer/highlight@npm:1.1.6, @lezer/highlight@npm:^1.0.0, @lezer/highlight@npm:^1.1.3": - version: 1.1.6 - resolution: "@lezer/highlight@npm:1.1.6" - dependencies: - "@lezer/common": ^1.0.0 - checksum: 411a702394c4c996b7d7f145a38f3a85a8cc698b3918acc7121c629255bb76d4ab383753f69009e011dc415210c6acbbb5b27bde613259ab67e600b29397b03b + checksum: 5b9dfe741f95db13f6124cb9556a43011cb8041ecf490be98d44a86b04d926a66e912bcd3a766f6a3d79e064410f1a2f60ab240b50b645a12c56987bf4870086 languageName: node linkType: hard "@lezer/html@npm:^1.3.0": - version: 1.3.6 - resolution: "@lezer/html@npm:1.3.6" + version: 1.3.7 + resolution: "@lezer/html@npm:1.3.7" dependencies: "@lezer/common": ^1.0.0 "@lezer/highlight": ^1.0.0 "@lezer/lr": ^1.0.0 - checksum: 1d3af781660968505e5083a34f31ea3549fd5f3949227fa93cc318bca61bce76ffe977bd875624ba938a2039834ec1a33df5d365e94c48131c85dd26f980d92c + checksum: 7145c0eae4f5cf79e34c6bf2fe3f812460969b58dd8923adeb2d14ddfbd6111fed91eaee24d914430c1dcca711a0aac144afc71df00abb750ed7b9d96a6b6f84 languageName: node linkType: hard "@lezer/java@npm:^1.0.0": - version: 1.0.4 - resolution: "@lezer/java@npm:1.0.4" + version: 1.1.0 + resolution: "@lezer/java@npm:1.1.0" dependencies: "@lezer/highlight": ^1.0.0 "@lezer/lr": ^1.0.0 - checksum: 97f5a2c2d733afba5dc57a0da9a97515b19b5e63bb5937717dac4e8c9baed74d15c0cb5c1580858b678931f11d517c56d89f903968fa48931f9c62e2ea67a107 + checksum: b22b344ed770d92c0e90d94caec695210670fa28a828548eeb48415ff3a2920804c3688c85f954e53b5a80b73263edecd6846901561b3837bc332ad09dfa23c2 languageName: node linkType: hard "@lezer/javascript@npm:^1.0.0": - version: 1.4.7 - resolution: "@lezer/javascript@npm:1.4.7" + version: 1.4.11 + resolution: "@lezer/javascript@npm:1.4.11" dependencies: "@lezer/highlight": ^1.1.3 "@lezer/lr": ^1.3.0 - checksum: 37c05793e0e45280fa5d7b845a3132a84596105d48b7d2c195abea0a198477ea6719b07d1c8967679e80fc466388151956901fd6962479c130ffda64a6d09591 + checksum: aeae5cd01702054593740deb66ed246d82cd8fc9d9788b2724d71a0ddce00743fdf710a2598c244e74d67efc32fa9147d5c0cf5a8d1da7be36a5994bf518cf6f languageName: node linkType: hard -"@lezer/lr@npm:^1.0.0, @lezer/lr@npm:^1.1.0, @lezer/lr@npm:^1.3.0": - version: 1.3.10 - resolution: "@lezer/lr@npm:1.3.10" +"@lezer/json@npm:^1.0.0": + version: 1.0.1 + resolution: "@lezer/json@npm:1.0.1" + dependencies: + "@lezer/highlight": ^1.0.0 + "@lezer/lr": ^1.0.0 + checksum: fcd17178f6a58e71c83e08fdc047e3708528b28591ba8f08ed35268f370d1ec9b63af0afa9d82a77fec26e9eb477ab3cfdc31c951e080d118ef607f9f9bb52e3 + languageName: node + linkType: hard + +"@lezer/lr@npm:^1.0.0, @lezer/lr@npm:^1.1.0, @lezer/lr@npm:^1.3.0, @lezer/lr@npm:^1.3.1, @lezer/lr@npm:^1.3.3": + version: 1.3.14 + resolution: "@lezer/lr@npm:1.3.14" dependencies: "@lezer/common": ^1.0.0 - checksum: 9d3c22bf692561cf7fe2f3d14e821913f87116ff9d73b8b550e7998b6135baae9f504563846a4257e1bb4eae97ae1b60c06c6066450ddeef5e03e8783526b2ae + checksum: 07be41edcb6c332a3567436d2c626131544181c4d680811baf23f6157db3dce4ebfef325cbd0b88dc8b128b83fbe6363c5dcf3e0a4ff369ddfae05d9f207daee languageName: node linkType: hard -"@lezer/markdown@npm:1.1.0, @lezer/markdown@npm:^1.0.0": - version: 1.1.0 - resolution: "@lezer/markdown@npm:1.1.0" +"@lezer/markdown@npm:1.1.2, @lezer/markdown@npm:^1.0.0": + version: 1.1.2 + resolution: "@lezer/markdown@npm:1.1.2" dependencies: "@lezer/common": ^1.0.0 "@lezer/highlight": ^1.0.0 - checksum: b3699c0724dd41e3e6e3078a0e1bcd272ccaebf17b20e5160de3ecf26200cdaa59aa19c9542aac5ab8c7e3aecce1003544b016bb5c32e458bbd5982add8ca0bf + checksum: 9de61f1915220466146086596ace8a48693ca708f8e3ec6f56aff657a18f258a3b6b4a0106662c055bd8eb7dfe11cede1f3d5bfc24e8bd33859e922d12330e93 languageName: node linkType: hard @@ -8144,6 +8261,16 @@ __metadata: languageName: node linkType: hard +"@lezer/python@npm:^1.1.4": + version: 1.1.9 + resolution: "@lezer/python@npm:1.1.9" + dependencies: + "@lezer/highlight": ^1.0.0 + "@lezer/lr": ^1.0.0 + checksum: cc7e712665f0b7990fd00ba798c2e377f8393d0034a85da33b370e256322d92f668f51b70aa91585ed165718bad60fba6e86203f877d537819874be2549ec31f + languageName: node + linkType: hard + "@lezer/rust@npm:^1.0.0": version: 1.0.1 resolution: "@lezer/rust@npm:1.0.1" @@ -8154,6 +8281,26 @@ __metadata: languageName: node linkType: hard +"@lezer/sass@npm:^1.0.0": + version: 1.0.3 + resolution: "@lezer/sass@npm:1.0.3" + dependencies: + "@lezer/highlight": ^1.0.0 + "@lezer/lr": ^1.0.0 + checksum: c87251fe30a86ad04e2d2373ca4eda56201eb9351b4e80feca49dc9e1ee8e9785af30fff2625afeaa08724b4b1562145694bb67d58ed40ded29e6f3f7a575d57 + languageName: node + linkType: hard + +"@lezer/xml@npm:^1.0.0": + version: 1.0.3 + resolution: "@lezer/xml@npm:1.0.3" + dependencies: + "@lezer/highlight": ^1.0.0 + "@lezer/lr": ^1.0.0 + checksum: a4758859abcab3bc3f8680f79f7fb7dbbb6842c7d552888f95cc85a845450342a18731fbf49cbaec5f39970b9e5b96a66c8381eda036d3ebf7c952da5ddd7666 + languageName: node + linkType: hard + "@malept/cross-spawn-promise@npm:^1.1.0": version: 1.1.1 resolution: "@malept/cross-spawn-promise@npm:1.1.1"