[ci] npm run format
This commit is contained in:
parent
54ba9f5ee1
commit
1d73883469
3 changed files with 8 additions and 10 deletions
|
@ -1,4 +1,3 @@
|
|||
|
||||
export interface MicromarkExtensionContext {
|
||||
sliceSerialize(node: any): string;
|
||||
raw(value: string): void;
|
||||
|
@ -9,4 +8,4 @@ export type MicromarkExtensionCallback = (this: MicromarkExtensionContext, node:
|
|||
export interface MicromarkExtension {
|
||||
enter?: Record<string, MicromarkExtensionCallback>;
|
||||
exit?: Record<string, MicromarkExtensionCallback>;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@ import type { MicromarkExtension } from '../../@types/micromark';
|
|||
import mdxExpression from 'micromark-extension-mdx-expression';
|
||||
import mdxJsx from 'micromark-extension-mdx-jsx';
|
||||
|
||||
|
||||
/**
|
||||
* Keep MDX.
|
||||
*/
|
||||
|
@ -12,12 +11,12 @@ export function encodeAstroMdx() {
|
|||
mdxJsxFlowTag(node: any) {
|
||||
const mdx = this.sliceSerialize(node);
|
||||
this.raw(mdx);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
return {
|
||||
htmlAstro: [mdxExpression(), mdxJsx()],
|
||||
mdAstro: extension
|
||||
mdAstro: extension,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
6
src/compiler/markdown/micromark.d.ts
vendored
6
src/compiler/markdown/micromark.d.ts
vendored
|
@ -1,11 +1,11 @@
|
|||
declare module 'micromark-extension-mdx-expression' {
|
||||
import type { HtmlExtension } from 'micromark/dist/shared-types';
|
||||
|
||||
export default function(): HtmlExtension;
|
||||
export default function (): HtmlExtension;
|
||||
}
|
||||
|
||||
declare module 'micromark-extension-mdx-jsx' {
|
||||
import type { HtmlExtension } from 'micromark/dist/shared-types';
|
||||
|
||||
export default function(): HtmlExtension;
|
||||
}
|
||||
export default function (): HtmlExtension;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue