@peaceroad/markdown-it-strong-ja 0.5.1 → 0.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -0
- package/index.js +1651 -1057
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -172,3 +172,18 @@ md.render('string**[text](url)**')
|
|
|
172
172
|
// <p>string**<a href="url">text</a>**</p>
|
|
173
173
|
```
|
|
174
174
|
|
|
175
|
+
### coreRulesBeforePostprocess
|
|
176
|
+
|
|
177
|
+
`strong_ja_postprocess` runs inside the markdown-it core pipeline. When other plugins register core rules, you can keep their rules ahead of `strong_ja_postprocess` by listing them in `coreRulesBeforePostprocess`. Each name is normalized, deduplicated, and re-ordered once during plugin setup.
|
|
178
|
+
|
|
179
|
+
```js
|
|
180
|
+
const md = mdit()
|
|
181
|
+
.use(cjkBreaks)
|
|
182
|
+
.use(mditStrongJa, {
|
|
183
|
+
coreRulesBeforePostprocess: ['cjk_breaks', 'my_custom_rule']
|
|
184
|
+
})
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
- Default: `[]`
|
|
188
|
+
- Specify `['cjk_breaks']` (or other rule names) when you rely on plugins such as `@peaceroad/markdown-it-cjk-breaks-mod` and need them to run first.
|
|
189
|
+
- Pass an empty array if you do not want `mditStrongJa` to reorder any core rules.
|