@@ -43,7 +43,9 @@ export default (
43
43
import webpack from ' webpack' ;
44
44
import { Options } from ' markdown-react-code-preview-loader' ;
45
45
/**
46
- * `mdCodeModulesLoader` method for adding `markdown-react-code-preview-loader` to webpack config.
46
+ * `mdCodeModulesLoader` method for adding
47
+ * `markdown-react-code-preview-loader` to webpack config.
48
+ *
47
49
* @param {webpack.Configuration} config webpack config
48
50
* @param {string[]} lang Parsing language
49
51
* @param {Options} option Loader Options
@@ -66,7 +68,11 @@ import webpack, { Configuration } from 'webpack';
66
68
import scopePluginOptions from ' @kkt/scope-plugin-options' ;
67
69
import { LoaderConfOptions } from ' kkt' ;
68
70
69
- export default (conf : Configuration , env : ' development' | ' production' , options : LoaderConfOptions ) => {
71
+ export default (
72
+ conf : Configuration ,
73
+ env : ' development' | ' production' ,
74
+ options : LoaderConfOptions
75
+ ) => {
70
76
// ....
71
77
config .module .rules .forEach ((ruleItem ) => {
72
78
if (typeof ruleItem === ' object' ) {
@@ -121,7 +127,8 @@ import mdObj from 'markdown-react-code-preview-loader/README.md';
121
127
122
128
// `README.md` raw string text
123
129
mdObj .source
124
- // The component index object, the React component converted from the markdown indexed example.
130
+ // The component index object,
131
+ // the React component converted from the markdown indexed example.
125
132
// (need to configure meta)
126
133
mdObj .components
127
134
// The component source code index object, the sample source code indexed from markdown.
@@ -203,9 +210,13 @@ import { getURLParameters } from 'markdown-react-code-preview-loader';
203
210
204
211
getURLParameters (' name=Adam&surname=Smith' ) // => { name: 'Adam', surname: "Smith" }
205
212
getURLParameters (' mdx:preview:demo12' ) // => { }
206
- getURLParameters (' mdx:preview:demo12&name=Adam&surname=Smith' ) // => { name: 'Adam', surname: "Smith" }
207
- getURLParameters (' mdx:preview:demo12&code=true&boreder=0' ) // => { code: 'true', boreder: "0" }
208
- getURLParameters (' mdx:preview:demo12?code=true&boreder=0' ) // => { code: 'true', boreder: "0" }
213
+
214
+ getURLParameters (' mdx:preview:demo12&name=Adam&surname=Smith' )
215
+ // => { name: 'Adam', surname: "Smith" }
216
+ getURLParameters (' mdx:preview:demo12&code=true&boreder=0' )
217
+ // => { code: 'true', boreder: "0" }
218
+ getURLParameters (' mdx:preview:demo12?code=true&boreder=0' )
219
+ // => { code: 'true', boreder: "0" }
209
220
```
210
221
211
222
``` markdown
@@ -238,7 +249,10 @@ export default Demo
238
249
## getCodeBlock
239
250
240
251
``` ts
241
- const getCodeBlock: (child : MarkdownParseData [' children' ], opts ? : Options ) => CodeBlockData [' data' ];
252
+ const getCodeBlock: (
253
+ child : MarkdownParseData [' children' ],
254
+ opts ? : Options
255
+ ) => CodeBlockData [' data' ];
242
256
```
243
257
244
258
## Configure meta ID
0 commit comments