Skip to content

Commit

Permalink
chore: fix lexical types
Browse files Browse the repository at this point in the history
  • Loading branch information
petyosi committed Jan 25, 2025
1 parent b87f138 commit 9c8c331
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/plugins/markdown-shortcut/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { realmPlugin } from '../../RealmWithPlugins'
import {
BOLD_ITALIC_STAR,
BOLD_ITALIC_UNDERSCORE,
Expand All @@ -11,16 +10,17 @@ import {
ITALIC_STAR,
ITALIC_UNDERSCORE,
LINK,
MultilineElementTransformer,
ORDERED_LIST,
QUOTE,
TextFormatTransformer,
TextMatchTransformer,
Transformer,
UNORDERED_LIST
} from '@lexical/markdown'
import { MarkdownShortcutPlugin } from '@lexical/react/LexicalMarkdownShortcutPlugin.js'
import { $createHeadingNode, $isHeadingNode, HeadingNode, HeadingTagType } from '@lexical/rich-text'
import { ElementNode } from 'lexical'
import React from 'react'
import { realmPlugin } from '../../RealmWithPlugins'
import { $createCodeBlockNode, CodeBlockNode } from '../codeblock/CodeBlockNode'
import { activePlugins$, addComposerChild$, addNestedEditorChild$ } from '../core'
import { HEADING_LEVEL, allowedHeadingLevels$ } from '../headings'
Expand Down Expand Up @@ -51,7 +51,7 @@ const createBlockNode = (createNode: (match: string[]) => ElementNode): ElementT
}

function pickTransformersForActivePlugins(pluginIds: string[], allowedHeadingLevels: readonly HEADING_LEVEL[]) {
const transformers: (ElementTransformer | TextFormatTransformer | TextMatchTransformer)[] = [
const transformers: Transformer[] = [
BOLD_ITALIC_STAR,
BOLD_ITALIC_UNDERSCORE,
BOLD_STAR,
Expand Down Expand Up @@ -101,7 +101,7 @@ function pickTransformersForActivePlugins(pluginIds: string[], allowedHeadingLev
}

if (pluginIds.includes('codeblock')) {
const codeTransformerCopy: ElementTransformer = {
const codeTransformerCopy: MultilineElementTransformer = {
...CODE,
dependencies: [CodeBlockNode],
replace: (parentNode, _children, match) => {
Expand Down

0 comments on commit 9c8c331

Please sign in to comment.