diff --git a/docs/Release Notes/Release Notes/v0.94.0.md b/docs/Release Notes/Release Notes/v0.94.0.md index 6d3cc78c6..0a573e92e 100644 --- a/docs/Release Notes/Release Notes/v0.94.0.md +++ b/docs/Release Notes/Release Notes/v0.94.0.md @@ -47,6 +47,7 @@ * Added support for Swift. * Added support for SystemVerilog. * Added support for mIRC. + * Added support for Cobol. * Mermaid diagrams: basic syntax highlight (not all diagram types are supported) and code folding. * Slight organization in Appearance settings: code block themes are now in "Text Notes", added a "Related settings" section in Appearance. * [Added support for opening and activating a note in a new tab using Ctrl+Shift+click on notes in the launcher pane, note tree, or note images](https://github.com/TriliumNext/Notes/pull/1854) by @SiriusXT diff --git a/packages/highlightjs/package.json b/packages/highlightjs/package.json index d49889360..c6eb24ed1 100644 --- a/packages/highlightjs/package.json +++ b/packages/highlightjs/package.json @@ -22,6 +22,7 @@ "@exercism/highlightjs-gdscript": "0.0.1", "@triliumnext/commons": "workspace:*", "highlight.js": "11.11.1", + "highlightjs-cobol": "0.3.3", "highlightjs-cypher": "1.2.0" } } diff --git a/packages/highlightjs/src/syntax_highlighting.ts b/packages/highlightjs/src/syntax_highlighting.ts index 1985c1092..6353f5ad9 100644 --- a/packages/highlightjs/src/syntax_highlighting.ts +++ b/packages/highlightjs/src/syntax_highlighting.ts @@ -50,7 +50,7 @@ const byMimeType: MimeRecord = { "text/x-clojure": () => import("highlight.js/lib/languages/clojure"), "text/x-clojurescript": () => import("highlight.js/lib/languages/clojure"), "text/x-cmake": () => import("highlight.js/lib/languages/cmake"), - "text/x-cobol": null, + "text/x-cobol": () => import("highlightjs-cobol"), "text/x-common-lisp": () => import("highlight.js/lib/languages/lisp"), "text/x-crystal": () => import("highlight.js/lib/languages/crystal"), "text/x-csharp": () => import("highlight.js/lib/languages/csharp"), diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 24f52aea7..df3823824 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1292,6 +1292,9 @@ importers: highlight.js: specifier: 11.11.1 version: 11.11.1 + highlightjs-cobol: + specifier: 0.3.3 + version: 0.3.3 highlightjs-cypher: specifier: 1.2.0 version: 1.2.0 @@ -8758,6 +8761,9 @@ packages: resolution: {integrity: sha512-Xwwo44whKBVCYoliBQwaPvtd/2tYFkRQtXDWj1nackaV2JPXx3L0+Jvd8/qCJ2p+ML0/XVkJ2q+Mr+UVdpJK5w==} engines: {node: '>=12.0.0'} + highlightjs-cobol@0.3.3: + resolution: {integrity: sha512-sdEHzA1UQM9Fjx6wMkWLq8VN70SHascq84aFJJzenOF2TwHE4nwtKCbhHGzOWQKN0AUnn0yAHfXQqaH8i2C8YA==} + highlightjs-cypher@1.2.0: resolution: {integrity: sha512-mOY/g6R1MgXiYx07icl8nwtXCRDSy4Y9EAlDZKia8Thqe766v6cjnrD6/xWak9UXoLQfWqbHhmRmYuw0SiO+CA==} @@ -24013,6 +24019,11 @@ snapshots: highlight.js@11.11.1: {} + highlightjs-cobol@0.3.3: + dependencies: + minimist: 1.2.8 + mkdirp: 1.0.4 + highlightjs-cypher@1.2.0: dependencies: minimist: 1.2.8