@@ -50,23 +50,23 @@ export const TagName = () => {
50
50
###### bar Qux [#]` ,
51
51
{ mdxOptions }
52
52
)
53
- expect ( result ) . toMatch ( ` <_components.h1 id="test-id">{"My Header"}` )
53
+ expect ( result ) . toMatch ( ' <_components.h1 id="test-id">{"My Header"}' )
54
54
expect ( result ) . toMatch (
55
- ` <_components.h2 id="extra-space">{"Some extra space"}</_components.h2>`
55
+ ' <_components.h2 id="extra-space">{"Some extra space"}</_components.h2>'
56
56
)
57
57
expect ( result ) . toMatch (
58
- ` <_components.h3 id="extra-space-in-heading">{"Some extra space in heading"}`
58
+ ' <_components.h3 id="extra-space-in-heading">{"Some extra space in heading"}'
59
59
)
60
60
expect ( result ) . toMatch (
61
- ` <_components.h3 id="without-space">{"nospace"}</_components.h3>`
61
+ ' <_components.h3 id="without-space">{"nospace"}</_components.h3>'
62
62
)
63
- expect ( result ) . toMatch ( ` <_components.h4 id="другой-язык">{"foo"}` )
64
- expect ( result ) . toMatch ( ` <_components.h5 id="bar-baz-">{"bar Baz []"}` )
65
- expect ( result ) . toMatch ( ` <_components.h6 id="bar-qux-">{"bar Qux [#]"}` )
63
+ expect ( result ) . toMatch ( ' <_components.h4 id="другой-язык">{"foo"}' )
64
+ expect ( result ) . toMatch ( ' <_components.h5 id="bar-baz-">{"bar Baz []"}' )
65
+ expect ( result ) . toMatch ( ' <_components.h6 id="bar-qux-">{"bar Qux [#]"}' )
66
66
} )
67
67
it ( 'use github-slugger' , async ( ) => {
68
- const { result } = await compileMdx ( ` ### My Header` , { mdxOptions } )
69
- expect ( result ) . toMatch ( ` <_components.h3 id="my-header">{"My Header"}` )
68
+ const { result } = await compileMdx ( ' ### My Header' , { mdxOptions } )
69
+ expect ( result ) . toMatch ( ' <_components.h3 id="my-header">{"My Header"}' )
70
70
} )
71
71
72
72
it ( 'should merge headings from partial components' , async ( ) => {
@@ -148,50 +148,50 @@ import Last from './three.mdx'
148
148
149
149
describe ( 'Link' , ( ) => {
150
150
it ( 'supports .md links' , async ( ) => {
151
- const { result } = await compileMdx ( ` [link](../file.md)` , { mdxOptions } )
152
- expect ( result ) . toMatch ( ` <_components.a href="../file">` )
151
+ const { result } = await compileMdx ( ' [link](../file.md)' , { mdxOptions } )
152
+ expect ( result ) . toMatch ( ' <_components.a href="../file">' )
153
153
} )
154
154
155
155
it ( 'supports .mdx links' , async ( ) => {
156
- const { result } = await compileMdx ( ` [link](../file.mdx)` , { mdxOptions } )
157
- expect ( result ) . toMatch ( ` <_components.a href="../file">` )
156
+ const { result } = await compileMdx ( ' [link](../file.mdx)' , { mdxOptions } )
157
+ expect ( result ) . toMatch ( ' <_components.a href="../file">' )
158
158
} )
159
159
160
160
it ( 'supports URL links' , async ( ) => {
161
- const { result } = await compileMdx ( ` [link](../file)` , { mdxOptions } )
162
- expect ( result ) . toMatch ( ` <_components.a href="../file">` )
161
+ const { result } = await compileMdx ( ' [link](../file)' , { mdxOptions } )
162
+ expect ( result ) . toMatch ( ' <_components.a href="../file">' )
163
163
} )
164
164
165
165
it ( 'supports query' , async ( ) => {
166
- const { result } = await compileMdx ( ` [link](../file.md?query=a)` , {
166
+ const { result } = await compileMdx ( ' [link](../file.md?query=a)' , {
167
167
mdxOptions
168
168
} )
169
- expect ( result ) . toMatch ( ` <_components.a href="../file?query=a">` )
169
+ expect ( result ) . toMatch ( ' <_components.a href="../file?query=a">' )
170
170
} )
171
171
172
172
it ( 'supports anchor' , async ( ) => {
173
- const { result } = await compileMdx ( ` [link](../file.md#anchor)` , {
173
+ const { result } = await compileMdx ( ' [link](../file.md#anchor)' , {
174
174
mdxOptions
175
175
} )
176
- expect ( result ) . toMatch ( ` <_components.a href="../file#anchor">` )
176
+ expect ( result ) . toMatch ( ' <_components.a href="../file#anchor">' )
177
177
} )
178
178
179
179
it ( 'supports external .md links' , async ( ) => {
180
- const { result } = await compileMdx ( ` [link](https://example.com/file.md)` , {
180
+ const { result } = await compileMdx ( ' [link](https://example.com/file.md)' , {
181
181
mdxOptions
182
182
} )
183
- expect ( result ) . toMatch ( ` <_components.a href="https://example.com/file.md">` )
183
+ expect ( result ) . toMatch ( ' <_components.a href="https://example.com/file.md">' )
184
184
} )
185
185
186
186
it ( 'supports external .mdx links' , async ( ) => {
187
187
const { result } = await compileMdx (
188
- ` [link](https://example.com/file.mdx)` ,
188
+ ' [link](https://example.com/file.mdx)' ,
189
189
{
190
190
mdxOptions
191
191
}
192
192
)
193
193
expect ( result ) . toMatch (
194
- ` <_components.a href="https://example.com/file.mdx">`
194
+ ' <_components.a href="https://example.com/file.mdx">'
195
195
)
196
196
} )
197
197
} )
@@ -242,15 +242,15 @@ describe('Code block', () => {
242
242
describe ( 'Copy code button' , ( ) => {
243
243
for ( const codeHighlight of [ true , false ] ) {
244
244
describe ( `codeHighlight: ${ codeHighlight } ` , ( ) => {
245
- it ( ` attach with "copy"` , async ( ) => {
245
+ it ( ' attach with "copy"' , async ( ) => {
246
246
const { result } = await compileMdx ( '```js copy\n```' , {
247
247
mdxOptions,
248
248
codeHighlight
249
249
} )
250
250
expect ( result ) . toMatch ( 'hasCopyCode>' )
251
251
} )
252
252
253
- it ( ` attach with "defaultShowCopyCode: true"` , async ( ) => {
253
+ it ( ' attach with "defaultShowCopyCode: true"' , async ( ) => {
254
254
const { result } = await compileMdx ( '```js\n```' , {
255
255
mdxOptions,
256
256
defaultShowCopyCode : true ,
@@ -259,7 +259,7 @@ describe('Code block', () => {
259
259
expect ( result ) . toMatch ( 'hasCopyCode>' )
260
260
} )
261
261
262
- it ( ` not attach with "defaultShowCopyCode: true" and "copy=false"` , async ( ) => {
262
+ it ( ' not attach with "defaultShowCopyCode: true" and "copy=false"' , async ( ) => {
263
263
const { result } = await compileMdx ( '```js copy=false\n```' , {
264
264
mdxOptions,
265
265
defaultShowCopyCode : true ,
0 commit comments