Skip to content

Commit d3289f6

Browse files
committed
fix: remove CodeHighlightNode to eliminate PrismJS dependency in server bundle
1 parent 5072036 commit d3289f6

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

apps/core/src/processors/helper/helper.lexical.service.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { CodeHighlightNode, CodeNode } from '@lexical/code'
1+
import { CodeNode } from '@lexical/code'
22
import { createHeadlessEditor } from '@lexical/headless'
33
import { AutoLinkNode, LinkNode } from '@lexical/link'
44
import { ListItemNode, ListNode } from '@lexical/list'
@@ -14,7 +14,6 @@ const EDITOR_NODES: Klass<LexicalNode>[] = [
1414
ListNode,
1515
ListItemNode,
1616
CodeNode,
17-
CodeHighlightNode,
1817
LinkNode,
1918
AutoLinkNode,
2019
]

apps/core/test/src/processors/helper/helper.lexical.service.spec.ts

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -187,18 +187,7 @@ describe('LexicalService', () => {
187187
it('converts code block', () => {
188188
const state = makeEditorState([
189189
{
190-
children: [
191-
{
192-
detail: 0,
193-
format: 0,
194-
mode: 'normal',
195-
style: '',
196-
text: 'const x = 1',
197-
type: 'code-highlight',
198-
version: 1,
199-
highlightType: null,
200-
},
201-
],
190+
children: [textNode('const x = 1')],
202191
direction: 'ltr',
203192
format: '',
204193
indent: 0,

0 commit comments

Comments
 (0)