@@ -308,10 +308,6 @@ function handleDirective(node, _, state, info) {
308308 const subexit = state . enter ( labelType )
309309 value += tracker . move ( '[' )
310310 value += tracker . move (
311- // @ts -expect-error: `containerPhrasing` is typed correctly, but TS
312- // generates *hardcoded* types, which means that our dynamically added
313- // directives are not present.
314- // At some point, TS should fix that, and `from-markdown` should be fine.
315311 state . containerPhrasing ( label , {
316312 ...tracker . current ( ) ,
317313 before : value ,
@@ -358,7 +354,7 @@ function peekDirective() {
358354function attributes ( node , state ) {
359355 const quote = state . options . quote || '"'
360356 const subset = node . type === 'textDirective' ? [ quote ] : [ quote , '\n' , '\r' ]
361- const attrs = node . attributes || { }
357+ const attributes = node . attributes || { }
362358 /** @type {Array<string> } */
363359 const values = [ ]
364360 /** @type {string | undefined } */
@@ -370,13 +366,13 @@ function attributes(node, state) {
370366 /** @type {string } */
371367 let key
372368
373- for ( key in attrs ) {
369+ for ( key in attributes ) {
374370 if (
375- own . call ( attrs , key ) &&
376- attrs [ key ] !== undefined &&
377- attrs [ key ] !== null
371+ own . call ( attributes , key ) &&
372+ attributes [ key ] !== undefined &&
373+ attributes [ key ] !== null
378374 ) {
379- const value = String ( attrs [ key ] )
375+ const value = String ( attributes [ key ] )
380376
381377 if ( key === 'id' ) {
382378 id = shortcut . test ( value ) ? '#' + value : quoted ( 'id' , value )
0 commit comments