mirror of
https://github.com/jxnblk/mdx-deck.git
synced 2024-11-29 13:58:02 +03:00
Update mdx options and snapshots
This commit is contained in:
parent
12bd1337ff
commit
d31d355cc2
@ -5,8 +5,8 @@ const mdxPlugin = require('@mdx-deck/mdx-plugin')
|
||||
module.exports = async function(src) {
|
||||
const callback = this.async()
|
||||
const options = getOptions(this) || {}
|
||||
options.mdPlugins = options.mdPlugins || []
|
||||
options.mdPlugins.push(mdxPlugin)
|
||||
options.remarkPlugins = options.mdPlugins || []
|
||||
options.remarkPlugins.push(mdxPlugin)
|
||||
|
||||
const result = mdx.sync(src, options)
|
||||
|
||||
|
@ -38,7 +38,7 @@ const rules = [
|
||||
{
|
||||
loader: require.resolve('@mdx-deck/loader'),
|
||||
options: {
|
||||
mdPlugins: [remark.emoji, remark.unwrapImages],
|
||||
remarkPlugins: [remark.emoji, remark.unwrapImages],
|
||||
},
|
||||
},
|
||||
],
|
||||
|
@ -41,19 +41,18 @@ const MDXLayout = props =>
|
||||
</section>
|
||||
export default function MDXContent({ components, ...props }) {
|
||||
return (
|
||||
<div
|
||||
name=\\"wrapper\\"
|
||||
<MDXLayout
|
||||
{...layoutProps}
|
||||
{...props}
|
||||
components={components}>
|
||||
<MDXLayout {...layoutProps} {...props}>
|
||||
|
||||
<h1 >{\`Hello\`}</h1>
|
||||
<hr ></hr>
|
||||
<h2 >{\`Two\`}</h2>
|
||||
<hr ></hr>
|
||||
<h2 >{\`Three\`}</h2>
|
||||
|
||||
</MDXLayout>
|
||||
</div>
|
||||
<h1>{\`Hello\`}</h1>
|
||||
<hr></hr>
|
||||
<h2>{\`Two\`}</h2>
|
||||
<hr></hr>
|
||||
<h2>{\`Three\`}</h2>
|
||||
|
||||
</MDXLayout>
|
||||
)
|
||||
}
|
||||
MDXContent.isMDXComponent = true"
|
||||
|
@ -16,7 +16,7 @@ export default props =>
|
||||
|
||||
test('adds an export', () => {
|
||||
const code = mdx.sync(src, {
|
||||
mdPlugins: [plugin],
|
||||
remarkPlugins: [plugin],
|
||||
})
|
||||
expect(typeof code).toBe('string')
|
||||
expect(code).toMatchSnapshot()
|
||||
|
Loading…
Reference in New Issue
Block a user