Skip to content

Commit 2459f09

Browse files
committed
doc: Update README.md
1 parent cf77648 commit 2459f09

File tree

2 files changed

+26
-8
lines changed

2 files changed

+26
-8
lines changed

core/README-zh.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@ import webpack, { Configuration } from 'webpack';
6666
import scopePluginOptions from '@kkt/scope-plugin-options';
6767
import { LoaderConfOptions } from 'kkt';
6868

69-
export default (conf: Configuration, env: 'development' | 'production', options: LoaderConfOptions) => {
69+
export default (
70+
conf: Configuration,
71+
env: 'development' | 'production',
72+
options: LoaderConfOptions
73+
) => {
7074
// ....
7175
config.module.rules.forEach((ruleItem) => {
7276
if (typeof ruleItem === 'object') {

core/README.md

+21-7
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ export default (
4343
import webpack from 'webpack';
4444
import { Options } from 'markdown-react-code-preview-loader';
4545
/**
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+
*
4749
* @param {webpack.Configuration} config webpack config
4850
* @param {string[]} lang Parsing language
4951
* @param {Options} option Loader Options
@@ -66,7 +68,11 @@ import webpack, { Configuration } from 'webpack';
6668
import scopePluginOptions from '@kkt/scope-plugin-options';
6769
import { LoaderConfOptions } from 'kkt';
6870

69-
export default (conf: Configuration, env: 'development' | 'production', options: LoaderConfOptions) => {
71+
export default (
72+
conf: Configuration,
73+
env: 'development' | 'production',
74+
options: LoaderConfOptions
75+
) => {
7076
// ....
7177
config.module.rules.forEach((ruleItem) => {
7278
if (typeof ruleItem === 'object') {
@@ -121,7 +127,8 @@ import mdObj from 'markdown-react-code-preview-loader/README.md';
121127

122128
// `README.md` raw string text
123129
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.
125132
// (need to configure meta)
126133
mdObj.components
127134
// 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';
203210

204211
getURLParameters('name=Adam&surname=Smith') // => { name: 'Adam', surname: "Smith" }
205212
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" }
209220
```
210221

211222
```markdown
@@ -238,7 +249,10 @@ export default Demo
238249
## getCodeBlock
239250

240251
```ts
241-
const getCodeBlock: (child: MarkdownParseData['children'], opts?: Options) => CodeBlockData['data'];
252+
const getCodeBlock: (
253+
child: MarkdownParseData['children'],
254+
opts?: Options
255+
) => CodeBlockData['data'];
242256
```
243257

244258
## Configure meta ID

0 commit comments

Comments
 (0)