Skip to content

Commit

Permalink
aa
Browse files Browse the repository at this point in the history
  • Loading branch information
dimaMachina committed Oct 18, 2024
1 parent c1fd329 commit b60ab2a
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 256 deletions.
5 changes: 3 additions & 2 deletions packages/nextra/src/server/compile.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import path from 'node:path'
import type { ProcessorOptions } from '@mdx-js/mdx'
import { createProcessor } from '@mdx-js/mdx'
import type { Processor } from '@mdx-js/mdx/lib/core'
import { remarkMermaid } from '@theguild/remark-mermaid'
import { remarkNpm2Yarn } from '@theguild/remark-npm2yarn'
import type { Program } from 'estree'
Expand Down Expand Up @@ -52,8 +51,10 @@ import {
} from './remark-plugins/index.js'
import { logger } from './utils.js'

type Processor = ReturnType<typeof createProcessor>

const cachedCompilerForFormat: Record<
Exclude<ProcessorOptions['format'], undefined | null>,
NonNullable<ProcessorOptions['format']>,
Processor
> = Object.create(null)

Expand Down
Loading

0 comments on commit b60ab2a

Please sign in to comment.