1010 */
1111
1212import { 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'
1813
1914footnoteReference . peek = footnoteReferencePeek
2015
@@ -146,12 +141,12 @@ function exitFootnoteCall(token) {
146141 * @param {FootnoteReference } node
147142 */
148143function footnoteReference ( node , _ , context , safeOptions ) {
149- const tracker = track ( safeOptions )
144+ const tracker = context . createTracker ( safeOptions )
150145 let value = tracker . move ( '[^' )
151146 const exit = context . enter ( 'footnoteReference' )
152147 const subexit = context . enter ( 'reference' )
153148 value += tracker . move (
154- safe ( context , association ( node ) , {
149+ context . safe ( context . associationId ( node ) , {
155150 ...tracker . current ( ) ,
156151 before : value ,
157152 after : ']'
@@ -173,12 +168,12 @@ function footnoteReferencePeek() {
173168 * @param {FootnoteDefinition } node
174169 */
175170function footnoteDefinition ( node , _ , context , safeOptions ) {
176- const tracker = track ( safeOptions )
171+ const tracker = context . createTracker ( safeOptions )
177172 let value = tracker . move ( '[^' )
178173 const exit = context . enter ( 'footnoteDefinition' )
179174 const subexit = context . enter ( 'label' )
180175 value += tracker . move (
181- safe ( context , association ( node ) , {
176+ context . safe ( context . associationId ( node ) , {
182177 ...tracker . current ( ) ,
183178 before : value ,
184179 after : ']'
@@ -190,7 +185,7 @@ function footnoteDefinition(node, _, context, safeOptions) {
190185 )
191186 tracker . shift ( 4 )
192187 value += tracker . move (
193- indentLines ( containerFlow ( node , context , tracker . current ( ) ) , map )
188+ context . indentLines ( context . containerFlow ( node , tracker . current ( ) ) , map )
194189 )
195190 exit ( )
196191
0 commit comments