Skip to content

Commit da8fef7

Browse files
committed
feat(YfmCut): support directiveSyntax experiment
1 parent ed85f71 commit da8fef7

File tree

13 files changed

+498
-98
lines changed

13 files changed

+498
-98
lines changed

demo/defaults/md-plugins.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,16 @@ type GetPluginsOptions = {
3535
directiveSyntax?: RenderPreviewParams['directiveSyntax'];
3636
};
3737

38-
export function getPlugins(_opts: GetPluginsOptions = {}): markdownit.PluginWithParams[] {
38+
export function getPlugins({
39+
directiveSyntax,
40+
}: GetPluginsOptions = {}): markdownit.PluginWithParams[] {
3941
const defaultPlugins: PluginWithParams[] = [
4042
anchors,
4143
code,
42-
yfmCut({bundle: false}),
44+
yfmCut({
45+
bundle: false,
46+
directiveSyntax: directiveSyntax?.mdPluginValueFor('yfmCut'),
47+
}),
4348
deflist,
4449
file,
4550
(md) => md.use(imsize, {enableInlineStyling: true}),

package-lock.json

Lines changed: 28 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@
200200
"tslib": "^2.3.1"
201201
},
202202
"devDependencies": {
203-
"@diplodoc/cut-extension": "^0.3.1",
203+
"@diplodoc/cut-extension": "^0.4.0",
204204
"@diplodoc/folding-headings-extension": "0.1.0",
205205
"@diplodoc/html-extension": "2.3.2",
206206
"@diplodoc/latex-extension": "1.0.3",
@@ -258,6 +258,7 @@
258258
"sass": "^1.64.1",
259259
"sass-loader": "^13.3.2",
260260
"stylelint": "15.11.0",
261+
"ts-dedent": "2.2.0",
261262
"ts-jest": "^27.0.7",
262263
"typescript": "^4.5.2"
263264
},
@@ -282,7 +283,7 @@
282283
}
283284
},
284285
"peerDependencies": {
285-
"@diplodoc/cut-extension": "^0.3.1",
286+
"@diplodoc/cut-extension": "^0.3.1 || ^0.4.0",
286287
"@diplodoc/folding-headings-extension": "^0.1.0",
287288
"@diplodoc/html-extension": "2.3.2",
288289
"@diplodoc/latex-extension": "^1.0.3",

0 commit comments

Comments
 (0)