@xyd-js/content 0.0.0-build

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.
Files changed (97) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/ISSUES.md +1 -0
  3. package/LICENSE +21 -0
  4. package/README.md +3 -0
  5. package/TODO.md +2 -0
  6. package/dist/index.d.ts +28 -0
  7. package/dist/index.js +1625 -0
  8. package/dist/index.js.map +1 -0
  9. package/dist/md.d.ts +72 -0
  10. package/dist/md.js +23508 -0
  11. package/dist/md.js.map +1 -0
  12. package/dist/mdToc-NBBxMJ4l.d.ts +12 -0
  13. package/dist/vite.d.ts +1066 -0
  14. package/dist/vite.js +20156 -0
  15. package/dist/vite.js.map +1 -0
  16. package/package.json +67 -0
  17. package/packages/md/index.ts +25 -0
  18. package/packages/md/plugins/component-directives/index.ts +3 -0
  19. package/packages/md/plugins/component-directives/mdComponentDirective.ts +577 -0
  20. package/packages/md/plugins/component-directives/types.ts +1 -0
  21. package/packages/md/plugins/component-directives/utils.ts +27 -0
  22. package/packages/md/plugins/composer/__fixtures__/1.single-example/input.md +7 -0
  23. package/packages/md/plugins/composer/__fixtures__/1.single-example/output.json +63 -0
  24. package/packages/md/plugins/composer/__fixtures__/2.single-example-with-name/input.md +7 -0
  25. package/packages/md/plugins/composer/__fixtures__/2.single-example-with-name/output.json +63 -0
  26. package/packages/md/plugins/composer/__fixtures__/3.multiple-examples/input.md +15 -0
  27. package/packages/md/plugins/composer/__fixtures__/3.multiple-examples/output.json +122 -0
  28. package/packages/md/plugins/composer/__fixtures__/4.example-groups/input.md +23 -0
  29. package/packages/md/plugins/composer/__fixtures__/4.example-groups/output.json +184 -0
  30. package/packages/md/plugins/composer/__tests__/mdComposer.test.ts +41 -0
  31. package/packages/md/plugins/composer/__tests__/testHelpers.ts +48 -0
  32. package/packages/md/plugins/composer/index.ts +1 -0
  33. package/packages/md/plugins/composer/mdComposer.ts +146 -0
  34. package/packages/md/plugins/developer-writing/index.ts +3 -0
  35. package/packages/md/plugins/developer-writing/mdCodeRehype.ts +81 -0
  36. package/packages/md/plugins/functions/__fixtures__/external.ts +4 -0
  37. package/packages/md/plugins/functions/__fixtures__/test-include.md +31 -0
  38. package/packages/md/plugins/functions/__fixtures__/test.js +11 -0
  39. package/packages/md/plugins/functions/__fixtures__/test.py +9 -0
  40. package/packages/md/plugins/functions/__fixtures__/test.ts +18 -0
  41. package/packages/md/plugins/functions/__tests__/mdFunctionImportCode.test.ts +314 -0
  42. package/packages/md/plugins/functions/__tests__/mdFunctionInclude.test.ts +44 -0
  43. package/packages/md/plugins/functions/__tests__/parseFunctionCall.test.ts +70 -0
  44. package/packages/md/plugins/functions/__tests__/testHelpers.ts +95 -0
  45. package/packages/md/plugins/functions/index.ts +15 -0
  46. package/packages/md/plugins/functions/mdFunctionChangelog.ts +135 -0
  47. package/packages/md/plugins/functions/mdFunctionImportCode.ts +92 -0
  48. package/packages/md/plugins/functions/mdFunctionInclude.ts +119 -0
  49. package/packages/md/plugins/functions/mdFunctionUniform.ts +79 -0
  50. package/packages/md/plugins/functions/types.ts +9 -0
  51. package/packages/md/plugins/functions/uniformProcessor.ts +349 -0
  52. package/packages/md/plugins/functions/utils.ts +457 -0
  53. package/packages/md/plugins/index.ts +125 -0
  54. package/packages/md/plugins/mdCode.ts +16 -0
  55. package/packages/md/plugins/mdHeadingId.ts +47 -0
  56. package/packages/md/plugins/mdImage.test.ts +59 -0
  57. package/packages/md/plugins/mdImage.ts +55 -0
  58. package/packages/md/plugins/mdImageRehype.ts +13 -0
  59. package/packages/md/plugins/mdPage.ts +35 -0
  60. package/packages/md/plugins/mdThemeSettings.ts +34 -0
  61. package/packages/md/plugins/mdToc.ts +229 -0
  62. package/packages/md/plugins/meta/index.ts +1 -0
  63. package/packages/md/plugins/meta/mdMeta.ts +198 -0
  64. package/packages/md/plugins/output-variables/__fixtures__/1.simple/input.md +22 -0
  65. package/packages/md/plugins/output-variables/__fixtures__/1.simple/output.json +191 -0
  66. package/packages/md/plugins/output-variables/__fixtures__/2.multiple-vars/input.md +21 -0
  67. package/packages/md/plugins/output-variables/__fixtures__/2.multiple-vars/output.json +127 -0
  68. package/packages/md/plugins/output-variables/__tests__/index.test.ts +28 -0
  69. package/packages/md/plugins/output-variables/__tests__/testHelpers.ts +36 -0
  70. package/packages/md/plugins/output-variables/index.ts +1 -0
  71. package/packages/md/plugins/output-variables/lib/const.ts +4 -0
  72. package/packages/md/plugins/output-variables/lib/factoryAttributes.ts +350 -0
  73. package/packages/md/plugins/output-variables/lib/factoryLabel.ts +135 -0
  74. package/packages/md/plugins/output-variables/lib/factoryName.ts +59 -0
  75. package/packages/md/plugins/output-variables/lib/index.ts +21 -0
  76. package/packages/md/plugins/output-variables/lib/outputVarsContainer.ts +328 -0
  77. package/packages/md/plugins/output-variables/lib/util.ts +494 -0
  78. package/packages/md/plugins/output-variables/remarkOutputVars.ts +22 -0
  79. package/packages/md/plugins/recmaOverrideComponents.ts +74 -0
  80. package/packages/md/plugins/rehypeHeading.ts +58 -0
  81. package/packages/md/plugins/types.ts +15 -0
  82. package/packages/md/plugins/utils/componentLike.ts +76 -0
  83. package/packages/md/plugins/utils/index.ts +2 -0
  84. package/packages/md/plugins/utils/injectCodeMeta.ts +59 -0
  85. package/packages/md/plugins/utils/mdParameters.test.ts +114 -0
  86. package/packages/md/plugins/utils/mdParameters.ts +249 -0
  87. package/packages/md/plugins/utils/mdastTypes.ts +42 -0
  88. package/packages/md/search/index.ts +257 -0
  89. package/packages/md/search/types.ts +36 -0
  90. package/packages/vite/index.ts +20 -0
  91. package/src/fs.ts +81 -0
  92. package/src/index.ts +7 -0
  93. package/src/navigation.ts +147 -0
  94. package/src/types.ts +8 -0
  95. package/tsconfig.json +49 -0
  96. package/tsup.config.ts +32 -0
  97. package/vitest.config.ts +17 -0
@@ -0,0 +1,350 @@
1
+ /**
2
+ * @import {Code, Effects, State, TokenType} from 'micromark-util-types'
3
+ */
4
+
5
+ import {ok as assert} from 'devlop'
6
+ import {factorySpace} from 'micromark-factory-space'
7
+ import {factoryWhitespace} from 'micromark-factory-whitespace'
8
+ import {
9
+ markdownLineEnding,
10
+ markdownLineEndingOrSpace,
11
+ markdownSpace,
12
+ unicodePunctuation,
13
+ unicodeWhitespace
14
+ } from 'micromark-util-character'
15
+ import {codes, types} from 'micromark-util-symbol'
16
+
17
+ import { PRIMARY_SYMBOL } from './const'
18
+
19
+ /**
20
+ * @param {Effects} effects
21
+ * @param {State} ok
22
+ * @param {State} nok
23
+ * @param {TokenType} attributesType
24
+ * @param {TokenType} attributesMarkerType
25
+ * @param {TokenType} attributeType
26
+ * @param {TokenType} attributeIdType
27
+ * @param {TokenType} attributeClassType
28
+ * @param {TokenType} attributeNameType
29
+ * @param {TokenType} attributeInitializerType
30
+ * @param {TokenType} attributeValueLiteralType
31
+ * @param {TokenType} attributeValueType
32
+ * @param {TokenType} attributeValueMarker
33
+ * @param {TokenType} attributeValueData
34
+ * @param {boolean | undefined} [disallowEol=false]
35
+ */
36
+ export function factoryAttributes(
37
+ effects,
38
+ ok,
39
+ nok,
40
+ attributesType,
41
+ attributesMarkerType,
42
+ attributeType,
43
+ attributeIdType,
44
+ attributeClassType,
45
+ attributeNameType,
46
+ attributeInitializerType,
47
+ attributeValueLiteralType,
48
+ attributeValueType,
49
+ attributeValueMarker,
50
+ attributeValueData,
51
+ disallowEol
52
+ ) {
53
+ /** @type {TokenType} */
54
+ let type
55
+ /** @type {Code | undefined} */
56
+ let marker
57
+
58
+ return start
59
+
60
+ /** @type {State} */
61
+ function start(code) {
62
+ assert(code === codes.leftCurlyBrace, 'expected `{`')
63
+ effects.enter(attributesType)
64
+ effects.enter(attributesMarkerType)
65
+ effects.consume(code)
66
+ effects.exit(attributesMarkerType)
67
+ return between
68
+ }
69
+
70
+ /** @type {State} */
71
+ function between(code) {
72
+ if (code === codes.numberSign) {
73
+ type = attributeIdType
74
+ return shortcutStart(code)
75
+ }
76
+
77
+ if (code === codes.dot) {
78
+ type = attributeClassType
79
+ return shortcutStart(code)
80
+ }
81
+
82
+ if (disallowEol && markdownSpace(code)) {
83
+ return factorySpace(effects, between, types.whitespace)(code)
84
+ }
85
+
86
+ if (!disallowEol && markdownLineEndingOrSpace(code)) {
87
+ return factoryWhitespace(effects, between)(code)
88
+ }
89
+
90
+ if (
91
+ code === codes.eof ||
92
+ markdownLineEnding(code) ||
93
+ unicodeWhitespace(code) ||
94
+ (unicodePunctuation(code) &&
95
+ code !== codes.dash &&
96
+ code !== codes.underscore)
97
+ ) {
98
+ return end(code)
99
+ }
100
+
101
+ effects.enter(attributeType)
102
+ effects.enter(attributeNameType)
103
+ effects.consume(code)
104
+ return name
105
+ }
106
+
107
+ /** @type {State} */
108
+ function shortcutStart(code) {
109
+ // Assume it’s registered.
110
+ const markerType = /** @type {TokenType} */ (type + 'Marker')
111
+ effects.enter(attributeType)
112
+ effects.enter(type)
113
+ effects.enter(markerType)
114
+ effects.consume(code)
115
+ effects.exit(markerType)
116
+ return shortcutStartAfter
117
+ }
118
+
119
+ /** @type {State} */
120
+ function shortcutStartAfter(code) {
121
+ if (
122
+ code === codes.eof ||
123
+ code === codes.quotationMark ||
124
+ code === codes.numberSign ||
125
+ code === codes.apostrophe ||
126
+ code === codes.dot ||
127
+ code === codes.lessThan ||
128
+ code === codes.equalsTo ||
129
+ code === codes.greaterThan ||
130
+ code === codes.graveAccent ||
131
+ code === codes.rightCurlyBrace ||
132
+ markdownLineEndingOrSpace(code)
133
+ ) {
134
+ return nok(code)
135
+ }
136
+
137
+ // Assume it’s registered.
138
+ const valueType = /** @type {TokenType} */ (type + 'Value')
139
+ effects.enter(valueType)
140
+ effects.consume(code)
141
+ return shortcut
142
+ }
143
+
144
+ /** @type {State} */
145
+ function shortcut(code) {
146
+ if (
147
+ code === codes.eof ||
148
+ code === codes.quotationMark ||
149
+ code === codes.apostrophe ||
150
+ code === codes.lessThan ||
151
+ code === codes.equalsTo ||
152
+ code === codes.greaterThan ||
153
+ code === codes.graveAccent
154
+ ) {
155
+ return nok(code)
156
+ }
157
+
158
+ if (
159
+ code === codes.numberSign ||
160
+ code === codes.dot ||
161
+ code === codes.rightCurlyBrace ||
162
+ markdownLineEndingOrSpace(code)
163
+ ) {
164
+ // Assume it’s registered.
165
+ const valueType = /** @type {TokenType} */ (type + 'Value')
166
+ effects.exit(valueType)
167
+ effects.exit(type)
168
+ effects.exit(attributeType)
169
+ return between(code)
170
+ }
171
+
172
+ effects.consume(code)
173
+ return shortcut
174
+ }
175
+
176
+ /** @type {State} */
177
+ function name(code) {
178
+ if (
179
+ code === codes.eof ||
180
+ markdownLineEnding(code) ||
181
+ unicodeWhitespace(code) ||
182
+ (unicodePunctuation(code) &&
183
+ code !== codes.dash &&
184
+ code !== codes.dot &&
185
+ code !== PRIMARY_SYMBOL &&
186
+ code !== codes.underscore)
187
+ ) {
188
+ effects.exit(attributeNameType)
189
+
190
+ if (disallowEol && markdownSpace(code)) {
191
+ return factorySpace(effects, nameAfter, types.whitespace)(code)
192
+ }
193
+
194
+ if (!disallowEol && markdownLineEndingOrSpace(code)) {
195
+ return factoryWhitespace(effects, nameAfter)(code)
196
+ }
197
+
198
+ return nameAfter(code)
199
+ }
200
+
201
+ effects.consume(code)
202
+ return name
203
+ }
204
+
205
+ /** @type {State} */
206
+ function nameAfter(code) {
207
+ if (code === codes.equalsTo) {
208
+ effects.enter(attributeInitializerType)
209
+ effects.consume(code)
210
+ effects.exit(attributeInitializerType)
211
+ return valueBefore
212
+ }
213
+
214
+ // Attribute w/o value.
215
+ effects.exit(attributeType)
216
+ return between(code)
217
+ }
218
+
219
+ /** @type {State} */
220
+ function valueBefore(code) {
221
+ if (
222
+ code === codes.eof ||
223
+ code === codes.lessThan ||
224
+ code === codes.equalsTo ||
225
+ code === codes.greaterThan ||
226
+ code === codes.graveAccent ||
227
+ code === codes.rightCurlyBrace ||
228
+ (disallowEol && markdownLineEnding(code))
229
+ ) {
230
+ return nok(code)
231
+ }
232
+
233
+ if (code === codes.quotationMark || code === codes.apostrophe) {
234
+ effects.enter(attributeValueLiteralType)
235
+ effects.enter(attributeValueMarker)
236
+ effects.consume(code)
237
+ effects.exit(attributeValueMarker)
238
+ marker = code
239
+ return valueQuotedStart
240
+ }
241
+
242
+ if (disallowEol && markdownSpace(code)) {
243
+ return factorySpace(effects, valueBefore, types.whitespace)(code)
244
+ }
245
+
246
+ if (!disallowEol && markdownLineEndingOrSpace(code)) {
247
+ return factoryWhitespace(effects, valueBefore)(code)
248
+ }
249
+
250
+ effects.enter(attributeValueType)
251
+ effects.enter(attributeValueData)
252
+ effects.consume(code)
253
+ marker = undefined
254
+ return valueUnquoted
255
+ }
256
+
257
+ /** @type {State} */
258
+ function valueUnquoted(code) {
259
+ if (
260
+ code === codes.eof ||
261
+ code === codes.quotationMark ||
262
+ code === codes.apostrophe ||
263
+ code === codes.lessThan ||
264
+ code === codes.equalsTo ||
265
+ code === codes.greaterThan ||
266
+ code === codes.graveAccent
267
+ ) {
268
+ return nok(code)
269
+ }
270
+
271
+ if (code === codes.rightCurlyBrace || markdownLineEndingOrSpace(code)) {
272
+ effects.exit(attributeValueData)
273
+ effects.exit(attributeValueType)
274
+ effects.exit(attributeType)
275
+ return between(code)
276
+ }
277
+
278
+ effects.consume(code)
279
+ return valueUnquoted
280
+ }
281
+
282
+ /** @type {State} */
283
+ function valueQuotedStart(code) {
284
+ if (code === marker) {
285
+ effects.enter(attributeValueMarker)
286
+ effects.consume(code)
287
+ effects.exit(attributeValueMarker)
288
+ effects.exit(attributeValueLiteralType)
289
+ effects.exit(attributeType)
290
+ return valueQuotedAfter
291
+ }
292
+
293
+ effects.enter(attributeValueType)
294
+ return valueQuotedBetween(code)
295
+ }
296
+
297
+ /** @type {State} */
298
+ function valueQuotedBetween(code) {
299
+ if (code === marker) {
300
+ effects.exit(attributeValueType)
301
+ return valueQuotedStart(code)
302
+ }
303
+
304
+ if (code === codes.eof) {
305
+ return nok(code)
306
+ }
307
+
308
+ // Note: blank lines can’t exist in content.
309
+ if (markdownLineEnding(code)) {
310
+ return disallowEol
311
+ ? nok(code)
312
+ : factoryWhitespace(effects, valueQuotedBetween)(code)
313
+ }
314
+
315
+ effects.enter(attributeValueData)
316
+ effects.consume(code)
317
+ return valueQuoted
318
+ }
319
+
320
+ /** @type {State} */
321
+ function valueQuoted(code) {
322
+ if (code === marker || code === codes.eof || markdownLineEnding(code)) {
323
+ effects.exit(attributeValueData)
324
+ return valueQuotedBetween(code)
325
+ }
326
+
327
+ effects.consume(code)
328
+ return valueQuoted
329
+ }
330
+
331
+ /** @type {State} */
332
+ function valueQuotedAfter(code) {
333
+ return code === codes.rightCurlyBrace || markdownLineEndingOrSpace(code)
334
+ ? between(code)
335
+ : end(code)
336
+ }
337
+
338
+ /** @type {State} */
339
+ function end(code) {
340
+ if (code === codes.rightCurlyBrace) {
341
+ effects.enter(attributesMarkerType)
342
+ effects.consume(code)
343
+ effects.exit(attributesMarkerType)
344
+ effects.exit(attributesType)
345
+ return ok
346
+ }
347
+
348
+ return nok(code)
349
+ }
350
+ }
@@ -0,0 +1,135 @@
1
+ /**
2
+ * @import {Code, Effects, State, Token, TokenType} from 'micromark-util-types'
3
+ */
4
+
5
+ import {ok as assert} from 'devlop'
6
+ import {markdownLineEnding} from 'micromark-util-character'
7
+ import {codes, constants, types} from 'micromark-util-symbol'
8
+
9
+ // This is a fork of:
10
+ // <https://github.com/micromark/micromark/tree/main/packages/micromark-factory-label>
11
+ // to allow empty labels, balanced brackets (such as for nested directives),
12
+ // text instead of strings, and optionally disallows EOLs.
13
+
14
+ /**
15
+ * @param {Effects} effects
16
+ * @param {State} ok
17
+ * @param {State} nok
18
+ * @param {TokenType} type
19
+ * @param {TokenType} markerType
20
+ * @param {TokenType} stringType
21
+ * @param {boolean | undefined} [disallowEol=false]
22
+ */
23
+ export function factoryLabel(
24
+ effects,
25
+ ok,
26
+ nok,
27
+ type,
28
+ markerType,
29
+ stringType,
30
+ disallowEol
31
+ ) {
32
+ let size = 0
33
+ let balance = 0
34
+ /** @type {Token | undefined} */
35
+ let previous
36
+
37
+ return start
38
+
39
+ /** @type {State} */
40
+ function start(code) {
41
+ assert(code === codes.leftSquareBracket, 'expected `[`')
42
+ effects.enter(type)
43
+ effects.enter(markerType)
44
+ effects.consume(code)
45
+ effects.exit(markerType)
46
+ return afterStart
47
+ }
48
+
49
+ /** @type {State} */
50
+ function afterStart(code) {
51
+ if (code === codes.rightSquareBracket) {
52
+ effects.enter(markerType)
53
+ effects.consume(code)
54
+ effects.exit(markerType)
55
+ effects.exit(type)
56
+ return ok
57
+ }
58
+
59
+ effects.enter(stringType)
60
+ return lineStart(code)
61
+ }
62
+
63
+ /** @type {State} */
64
+ function lineStart(code) {
65
+ if (code === codes.rightSquareBracket && !balance) {
66
+ return atClosingBrace(code)
67
+ }
68
+
69
+ const token = effects.enter(types.chunkText, {
70
+ _contentTypeTextTrailing: true,
71
+ contentType: constants.contentTypeText,
72
+ previous
73
+ })
74
+ if (previous) previous.next = token
75
+ previous = token
76
+ return data(code)
77
+ }
78
+
79
+ /** @type {State} */
80
+ function data(code) {
81
+ if (code === codes.eof || size > constants.linkReferenceSizeMax) {
82
+ return nok(code)
83
+ }
84
+
85
+ if (
86
+ code === codes.leftSquareBracket &&
87
+ ++balance > constants.linkResourceDestinationBalanceMax
88
+ ) {
89
+ return nok(code)
90
+ }
91
+
92
+ if (code === codes.rightSquareBracket && !balance--) {
93
+ effects.exit(types.chunkText)
94
+ return atClosingBrace(code)
95
+ }
96
+
97
+ if (markdownLineEnding(code)) {
98
+ if (disallowEol) {
99
+ return nok(code)
100
+ }
101
+
102
+ effects.consume(code)
103
+ effects.exit(types.chunkText)
104
+ return lineStart
105
+ }
106
+
107
+ effects.consume(code)
108
+ return code === codes.backslash ? dataEscape : data
109
+ }
110
+
111
+ /** @type {State} */
112
+ function dataEscape(code) {
113
+ if (
114
+ code === codes.leftSquareBracket ||
115
+ code === codes.backslash ||
116
+ code === codes.rightSquareBracket
117
+ ) {
118
+ effects.consume(code)
119
+ size++
120
+ return data
121
+ }
122
+
123
+ return data(code)
124
+ }
125
+
126
+ /** @type {State} */
127
+ function atClosingBrace(code) {
128
+ effects.exit(stringType)
129
+ effects.enter(markerType)
130
+ effects.consume(code)
131
+ effects.exit(markerType)
132
+ effects.exit(type)
133
+ return ok
134
+ }
135
+ }
@@ -0,0 +1,59 @@
1
+ /**
2
+ * @import {Code, Effects, State, TokenizeContext, TokenType} from 'micromark-util-types'
3
+ */
4
+
5
+ import {
6
+ markdownLineEnding,
7
+ unicodePunctuation,
8
+ unicodeWhitespace
9
+ } from 'micromark-util-character'
10
+ import {codes} from 'micromark-util-symbol'
11
+
12
+ /**
13
+ * @this {TokenizeContext}
14
+ * @param {Effects} effects
15
+ * @param {State} ok
16
+ * @param {State} nok
17
+ * @param {TokenType} type
18
+ */
19
+ export function factoryName(effects, ok, nok, type) {
20
+ const self = this
21
+
22
+ return start
23
+
24
+ /** @type {State} */
25
+ function start(code) {
26
+ if (
27
+ code === codes.eof ||
28
+ markdownLineEnding(code) ||
29
+ unicodePunctuation(code) ||
30
+ unicodeWhitespace(code)
31
+ ) {
32
+ return nok(code)
33
+ }
34
+
35
+ effects.enter(type)
36
+ effects.consume(code)
37
+ return name
38
+ }
39
+
40
+ /** @type {State} */
41
+ function name(code) {
42
+ if (
43
+ code === codes.eof ||
44
+ markdownLineEnding(code) ||
45
+ unicodeWhitespace(code) ||
46
+ (unicodePunctuation(code) &&
47
+ code !== codes.dash &&
48
+ code !== codes.underscore)
49
+ ) {
50
+ effects.exit(type)
51
+ return self.previous === codes.dash || self.previous === codes.underscore
52
+ ? nok(code)
53
+ : ok(code)
54
+ }
55
+
56
+ effects.consume(code)
57
+ return name
58
+ }
59
+ }
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @import {Extension} from 'micromark-util-types'
3
+ */
4
+
5
+ import { codes } from 'micromark-util-symbol'
6
+
7
+ import { outputVarsContainer } from './outputVarsContainer'
8
+ import { PRIMARY_SYMBOL } from './const'
9
+
10
+ /**
11
+ * Create an extension for `micromark` to enable output vars syntax.
12
+ *
13
+ * @returns {Extension}
14
+ * Extension for `micromark` that can be passed in `extensions`, to
15
+ * enable output vars syntax.
16
+ */
17
+ export function outputVars() {
18
+ return {
19
+ flow: { [PRIMARY_SYMBOL]: [outputVarsContainer] }
20
+ }
21
+ }