File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,6 @@ function value(token) {
89
89
* Extension for `mdast-util-to-markdown`.
90
90
*/
91
91
export function frontmatterToMarkdown ( options ) {
92
- // To do: use an extension object with `satisfies` later.
93
92
/** @type {ToMarkdownExtension['unsafe'] } */
94
93
const unsafe = [ ]
95
94
/** @type {ToMarkdownExtension['handlers'] } */
@@ -104,8 +103,13 @@ export function frontmatterToMarkdown(options) {
104
103
// Typing those is the responsibility of the end user.
105
104
handlers [ matter . type ] = handler ( matter )
106
105
107
- // To do: idea: perhaps make this smarter, with an `after` of the second char?
108
- unsafe . push ( { atBreak : true , character : fence ( matter , 'open' ) . charAt ( 0 ) } )
106
+ const open = fence ( matter , 'open' )
107
+
108
+ unsafe . push ( {
109
+ atBreak : true ,
110
+ character : open . charAt ( 0 ) ,
111
+ after : open . charAt ( 1 )
112
+ } )
109
113
}
110
114
111
115
return { unsafe, handlers}
You can’t perform that action at this time.
0 commit comments