[ci] format
This commit is contained in:
parent
2a1c085b19
commit
6a1e4ca02c
2 changed files with 17 additions and 13 deletions
|
@ -1,4 +1,3 @@
|
||||||
import type { Options as RemarkRehypeOptions } from 'remark-rehype';
|
|
||||||
import { compile as mdxCompile } from '@mdx-js/mdx';
|
import { compile as mdxCompile } from '@mdx-js/mdx';
|
||||||
import { PluggableList } from '@mdx-js/mdx/lib/core.js';
|
import { PluggableList } from '@mdx-js/mdx/lib/core.js';
|
||||||
import mdxPlugin, { Options as MdxRollupPluginOptions } from '@mdx-js/rollup';
|
import mdxPlugin, { Options as MdxRollupPluginOptions } from '@mdx-js/rollup';
|
||||||
|
@ -6,6 +5,7 @@ import type { AstroIntegration } from 'astro';
|
||||||
import { parse as parseESM } from 'es-module-lexer';
|
import { parse as parseESM } from 'es-module-lexer';
|
||||||
import { blue, bold } from 'kleur/colors';
|
import { blue, bold } from 'kleur/colors';
|
||||||
import fs from 'node:fs/promises';
|
import fs from 'node:fs/promises';
|
||||||
|
import type { Options as RemarkRehypeOptions } from 'remark-rehype';
|
||||||
import { VFile } from 'vfile';
|
import { VFile } from 'vfile';
|
||||||
import type { Plugin as VitePlugin } from 'vite';
|
import type { Plugin as VitePlugin } from 'vite';
|
||||||
import {
|
import {
|
||||||
|
|
|
@ -30,12 +30,14 @@ describe('MDX with Astro Markdown remark-rehype config', () => {
|
||||||
it('Renders footnotes with values from custom configuration extending the default', async () => {
|
it('Renders footnotes with values from custom configuration extending the default', async () => {
|
||||||
const fixture = await loadFixture({
|
const fixture = await loadFixture({
|
||||||
root: new URL('./fixtures/mdx-astro-markdown-remarkRehype/', import.meta.url),
|
root: new URL('./fixtures/mdx-astro-markdown-remarkRehype/', import.meta.url),
|
||||||
integrations: [mdx({
|
integrations: [
|
||||||
remarkRehype: {
|
mdx({
|
||||||
footnoteLabel: 'Catatan kaki',
|
remarkRehype: {
|
||||||
footnoteBackLabel: 'Kembali ke konten',
|
footnoteLabel: 'Catatan kaki',
|
||||||
},
|
footnoteBackLabel: 'Kembali ke konten',
|
||||||
})],
|
},
|
||||||
|
}),
|
||||||
|
],
|
||||||
markdown: {
|
markdown: {
|
||||||
remarkRehype: {
|
remarkRehype: {
|
||||||
footnoteBackLabel: 'Replace me',
|
footnoteBackLabel: 'Replace me',
|
||||||
|
@ -56,12 +58,14 @@ describe('MDX with Astro Markdown remark-rehype config', () => {
|
||||||
it('Renders footnotes with values from custom configuration without extending the default', async () => {
|
it('Renders footnotes with values from custom configuration without extending the default', async () => {
|
||||||
const fixture = await loadFixture({
|
const fixture = await loadFixture({
|
||||||
root: new URL('./fixtures/mdx-astro-markdown-remarkRehype/', import.meta.url),
|
root: new URL('./fixtures/mdx-astro-markdown-remarkRehype/', import.meta.url),
|
||||||
integrations: [mdx({
|
integrations: [
|
||||||
extendPlugins: 'astroDefaults',
|
mdx({
|
||||||
remarkRehype: {
|
extendPlugins: 'astroDefaults',
|
||||||
footnoteLabel: 'Catatan kaki',
|
remarkRehype: {
|
||||||
},
|
footnoteLabel: 'Catatan kaki',
|
||||||
})],
|
},
|
||||||
|
}),
|
||||||
|
],
|
||||||
markdown: {
|
markdown: {
|
||||||
remarkRehype: {
|
remarkRehype: {
|
||||||
footnoteBackLabel: 'Kembali ke konten',
|
footnoteBackLabel: 'Kembali ke konten',
|
||||||
|
|
Loading…
Reference in a new issue