10
10
*/
11
11
12
12
import { normalizeIdentifier } from 'micromark-util-normalize-identifier'
13
- import { association } from 'mdast-util-to-markdown/lib/util/association.js'
14
- import { containerFlow } from 'mdast-util-to-markdown/lib/util/container-flow.js'
15
- import { indentLines } from 'mdast-util-to-markdown/lib/util/indent-lines.js'
16
- import { safe } from 'mdast-util-to-markdown/lib/util/safe.js'
17
- import { track } from 'mdast-util-to-markdown/lib/util/track.js'
18
13
19
14
footnoteReference . peek = footnoteReferencePeek
20
15
@@ -146,12 +141,12 @@ function exitFootnoteCall(token) {
146
141
* @param {FootnoteReference } node
147
142
*/
148
143
function footnoteReference ( node , _ , context , safeOptions ) {
149
- const tracker = track ( safeOptions )
144
+ const tracker = context . createTracker ( safeOptions )
150
145
let value = tracker . move ( '[^' )
151
146
const exit = context . enter ( 'footnoteReference' )
152
147
const subexit = context . enter ( 'reference' )
153
148
value += tracker . move (
154
- safe ( context , association ( node ) , {
149
+ context . safe ( context . associationId ( node ) , {
155
150
...tracker . current ( ) ,
156
151
before : value ,
157
152
after : ']'
@@ -173,12 +168,12 @@ function footnoteReferencePeek() {
173
168
* @param {FootnoteDefinition } node
174
169
*/
175
170
function footnoteDefinition ( node , _ , context , safeOptions ) {
176
- const tracker = track ( safeOptions )
171
+ const tracker = context . createTracker ( safeOptions )
177
172
let value = tracker . move ( '[^' )
178
173
const exit = context . enter ( 'footnoteDefinition' )
179
174
const subexit = context . enter ( 'label' )
180
175
value += tracker . move (
181
- safe ( context , association ( node ) , {
176
+ context . safe ( context . associationId ( node ) , {
182
177
...tracker . current ( ) ,
183
178
before : value ,
184
179
after : ']'
@@ -190,7 +185,7 @@ function footnoteDefinition(node, _, context, safeOptions) {
190
185
)
191
186
tracker . shift ( 4 )
192
187
value += tracker . move (
193
- indentLines ( containerFlow ( node , context , tracker . current ( ) ) , map )
188
+ context . indentLines ( context . containerFlow ( node , tracker . current ( ) ) , map )
194
189
)
195
190
exit ( )
196
191
0 commit comments