There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.
TypeScript appcrdteditorelectronknowledge-basemarkdownmironotesnotionnotion-alternativerustrust-langrust-languagetabletableviewwhiteboardwikiworkspace
feat(component): add support for elixir highlighting in code block
Caleb OLearyb183506c134b
diff --git a/libs/components/editor-blocks/package.json b/libs/components/editor-blocks/package.jsonindex d497e04e0f..d558743117 100644--- a/libs/components/editor-blocks/package.json+++ b/libs/components/editor-blocks/package.json@@ -31,6 +31,7 @@"@mui/system": "^5.8.6","code-example": "^3.3.6","codemirror": "6.0.1",+ "codemirror-lang-elixir": "^3.0.0","keymap": "link:@codemirror/next/keymap","nanoid": "^4.0.0","react-resizable": "^3.0.4",diff --git a/libs/components/editor-blocks/src/blocks/code/CodeView.tsx b/libs/components/editor-blocks/src/blocks/code/CodeView.tsxindex 3b64cc3b1a..0ef732cd54 100644--- a/libs/components/editor-blocks/src/blocks/code/CodeView.tsx+++ b/libs/components/editor-blocks/src/blocks/code/CodeView.tsx@@ -32,6 +32,7 @@ import { powerShell } from '@codemirror/legacy-modes/mode/powershell';import { brainfuck } from '@codemirror/legacy-modes/mode/brainfuck';import { stylus } from '@codemirror/legacy-modes/mode/stylus';import { erlang } from '@codemirror/legacy-modes/mode/erlang';+import { elixir } from 'codemirror-lang-elixir';import { nginx } from '@codemirror/legacy-modes/mode/nginx';import { perl } from '@codemirror/legacy-modes/mode/perl';import { pascal } from '@codemirror/legacy-modes/mode/pascal';@@ -87,6 +88,7 @@ const langs: Record<string, any> = {brainfuck: () => StreamLanguage.define(brainfuck),stylus: () => StreamLanguage.define(stylus),erlang: () => StreamLanguage.define(erlang),+ elixir: () => StreamLanguage.define(elixir),nginx: () => StreamLanguage.define(nginx),perl: () => StreamLanguage.define(perl),ruby: () => StreamLanguage.define(ruby),diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 852beb66c2..27172f8157 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -401,6 +401,7 @@ importers:'@types/react-window': ^1.8.5code-example: ^3.3.6codemirror: 6.0.1+ codemirror-lang-elixir: ^3.0.0keymap: link:@codemirror/next/keymapnanoid: ^4.0.0react-resizable: ^3.0.4@@ -437,6 +438,7 @@ importers:'@mui/system': 5.8.7_d6menda4vqwq6peqnkbe7mkj4icode-example: 3.3.6codemirror: 6.0.1+ codemirror-lang-elixir: 3.0.0_@[email protected]keymap: link:@codemirror/next/keymapnanoid: 4.0.0react-resizable: 3.0.4@@ -4578,8 +4580,8 @@ packages:dependencies:'@babel/runtime': 7.18.6'@emotion/cache': 11.9.3- '@emotion/react': 11.9.3- '@emotion/styled': 11.9.3_@[email protected]+ '@emotion/react': 11.9.3_@[email protected]+ '@emotion/styled': 11.9.3_dc5dh2wp562rsjxvguwi2i3yzqcsstype: 3.1.0prop-types: 15.8.1dev: false@@ -8518,6 +8520,14 @@ packages:engines: {node: '>=0.10.0'}dev: true+ /codemirror-lang-elixir/3.0.0_@[email protected]:+ resolution: {integrity: sha512-Liy5MDxf+xw7aFqNfhLfntSK6vsRkI0lSlyytw23P1hWSrb0Bw5WunEB3iKJ49iUu8Kj2dx+vvMqD8I5ms7rSQ==}+ peerDependencies:+ '@codemirror/language': ^6.2.1+ dependencies:+ '@codemirror/language': 6.2.0+ dev: false+/codemirror/6.0.1:resolution: {integrity: sha512-J8j+nZ+CdWmIeFIGXEFbFPtpiYacFMDR8GlHK3IyHQJMCaVRfGx9NT+Hxivv1ckLWPvNdZqndbr/7lVhrf/Svg==}dependencies: