diff options
author | 2023-05-17 13:16:36 +0000 | |
---|---|---|
committer | 2023-05-17 13:16:36 +0000 | |
commit | d4b00b541b5893ef37ccdb4bfb00bdfa9ee29849 (patch) | |
tree | d8403b23200dc92fa26d2ce4ce1d01a01a04f0bd /packages/integrations/markdoc/src/nodes/heading.ts | |
parent | fb84622af04f795de8d17f24192de105f70fe910 (diff) | |
download | astro-d4b00b541b5893ef37ccdb4bfb00bdfa9ee29849.tar.gz astro-d4b00b541b5893ef37ccdb4bfb00bdfa9ee29849.tar.zst astro-d4b00b541b5893ef37ccdb4bfb00bdfa9ee29849.zip |
[ci] format
Diffstat (limited to 'packages/integrations/markdoc/src/nodes/heading.ts')
-rw-r--r-- | packages/integrations/markdoc/src/nodes/heading.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/packages/integrations/markdoc/src/nodes/heading.ts b/packages/integrations/markdoc/src/nodes/heading.ts index 81a9181c7..8adf57612 100644 --- a/packages/integrations/markdoc/src/nodes/heading.ts +++ b/packages/integrations/markdoc/src/nodes/heading.ts @@ -1,8 +1,8 @@ import Markdoc, { type RenderableTreeNode, type Schema } from '@markdoc/markdoc'; -import { getTextContent } from '../runtime.js'; import Slugger from 'github-slugger'; +import { getTextContent } from '../runtime.js'; -export const headingSlugger = new Slugger(); +export const headingSlugger = new Slugger(); function getSlug(attributes: Record<string, any>, children: RenderableTreeNode[]): string { if (attributes.id && typeof attributes.id === 'string') { @@ -25,7 +25,6 @@ export const heading: Schema = { const { level, ...attributes } = node.transformAttributes(config); const children = node.transformChildren(config); - const slug = getSlug(attributes, children); const render = config.nodes?.heading?.render ?? `h${level}`; |