@@ -408,28 +408,28 @@ const findResult = function findResult(name) {
408
408
// Check BCD
409
409
let bcdResults = [ ] ;
410
410
for ( const section of Object . keys ( bcd ) . filter ( k => ! k . startsWith ( '__' ) ) ) { // css, js, html, …
411
- for ( const [ subsectionKey , subsection ] of Object . entries ( bcd [ section ] ) ) { // at-rules, properties, …
412
- for ( const [ entryKey , entry ] of Object . entries ( subsection ) ) {
413
- if ( entryKey == '__compat' ) {
414
- if ( subsectionKey === name || entry . description ?. includes ( name ) ) {
415
- bcdResults . push ( {
416
- key : `mdn-${ section } _${ subsectionKey } ` ,
417
- data : entry
418
- } ) ;
419
- }
420
- } else {
421
- if ( entryKey === name || entry [ '__compat' ] ?. description ?. includes ( name ) ) {
422
- bcdResults . push ( {
423
- key : `mdn-${ section } _${ subsectionKey } _${ entryKey } ` ,
424
- data : entry [ '__compat' ]
425
- } ) ;
411
+ for ( const [ subsectionKey , subsection ] of Object . entries ( bcd [ section ] ) ) { // css: at-rules, properties, …
412
+ for ( const [ entryKey , entry ] of Object . entries ( subsection ) ) { // properties: writing_mode, word-wrap, …
413
+ for ( const [ subEntryKey , subEntry ] of Object . entries ( entry ) ) { // writing-mode: __compat, horizontal-tb, lr, lr-tb, …
414
+ if ( subEntryKey == '__compat' ) {
415
+ if ( entryKey === name || entry [ '__compat' ] . description ?. includes ( name ) ) {
416
+ bcdResults . push ( {
417
+ key : `mdn-${ section } _${ subsectionKey } _${ entryKey } ` ,
418
+ data : subEntry
419
+ } ) ;
420
+ }
421
+ } else {
422
+ if ( subEntryKey === name || subEntry [ '__compat' ] ?. description ?. includes ( name ) ) {
423
+ bcdResults . push ( {
424
+ key : `mdn-${ section } _${ subsectionKey } _${ entryKey } _${ subEntryKey } ` ,
425
+ data : subEntry [ '__compat' ]
426
+ } ) ;
427
+ }
426
428
}
427
429
}
428
430
}
429
431
}
430
432
}
431
-
432
- // @TODO : Convert BCD format to CanIUse format
433
433
bcdResults = bcdResults . map ( bcdResult => convertBCDEntryToCanIUseEntry ( bcdResult . key , bcdResult . data ) ) ;
434
434
435
435
// return array of matches
0 commit comments