File tree Expand file tree Collapse file tree 4 files changed +16
-11
lines changed Expand file tree Collapse file tree 4 files changed +16
-11
lines changed Original file line number Diff line number Diff line change 1
1
'use strict'
2
2
3
- module . exports = require ( './dist' )
3
+ module . exports = require ( './dist/index.js ' )
Original file line number Diff line number Diff line change @@ -505,9 +505,8 @@ function compiler(options) {
505
505
506
506
function onexitatxheadingsequence ( token ) {
507
507
if ( ! this . stack [ this . stack . length - 1 ] . depth ) {
508
- this . stack [ this . stack . length - 1 ] . depth = this . sliceSerialize (
509
- token
510
- ) . length
508
+ this . stack [ this . stack . length - 1 ] . depth =
509
+ this . sliceSerialize ( token ) . length
511
510
}
512
511
}
513
512
Original file line number Diff line number Diff line change 47
47
"browserify" : " ^17.0.0" ,
48
48
"commonmark.json" : " ^0.29.0" ,
49
49
"dtslint" : " ^4.0.0" ,
50
- "gzip-size-cli" : " ^4 .0.0" ,
50
+ "gzip-size-cli" : " ^5 .0.0" ,
51
51
"hast-util-to-html" : " ^7.0.0" ,
52
52
"mdast-util-to-hast" : " ^10.0.0" ,
53
53
"nyc" : " ^15.0.0" ,
59
59
"tape" : " ^5.0.0" ,
60
60
"tinyify" : " ^3.0.0" ,
61
61
"unified" : " ^9.0.0" ,
62
- "xo" : " ^0.37 .0"
62
+ "xo" : " ^0.38 .0"
63
63
},
64
64
"scripts" : {
65
65
"format" : " remark . -qfo && prettier . -w --loglevel warn && xo --fix" ,
66
- "generate-dist" : " babel lib/ --out-dir dist/ --quiet --retain-lines; prettier dist/ --loglevel error --write" ,
66
+ "generate-dist" : " babel lib/ --out-dir dist/ --quiet --retain-lines; prettier dist/index.js --loglevel error --write" ,
67
67
"generate-size" : " browserify . -p tinyify -s mdast-util-from-markdown -o mdast-util-from-markdown.min.js; gzip-size mdast-util-from-markdown.min.js --raw" ,
68
68
"generate" : " npm run generate-dist && npm run generate-size" ,
69
69
"test-api" : " node test" ,
Original file line number Diff line number Diff line change @@ -894,10 +894,13 @@ test('mdast-util-from-markdown', function (t) {
894
894
895
895
test ( 'fixtures' , function ( t ) {
896
896
var base = join ( 'test' , 'fixtures' )
897
+ const files = fs . readdirSync ( base ) . filter ( ( d ) => path . extname ( d ) === '.md' )
898
+ let index = - 1
897
899
898
- fs . readdirSync ( base )
899
- . filter ( ( d ) => path . extname ( d ) === '.md' )
900
- . forEach ( ( d ) => each ( path . basename ( d , path . extname ( d ) ) ) )
900
+ while ( ++ index < files . length ) {
901
+ const file = files [ index ]
902
+ each ( path . basename ( file , path . extname ( file ) ) )
903
+ }
901
904
902
905
t . end ( )
903
906
@@ -920,7 +923,10 @@ test('fixtures', function (t) {
920
923
} )
921
924
922
925
test ( 'commonmark' , function ( t ) {
923
- commonmark . forEach ( each )
926
+ let index = - 1
927
+ while ( ++ index < commonmark . length ) {
928
+ each ( commonmark [ index ] , index )
929
+ }
924
930
925
931
t . end ( )
926
932
You can’t perform that action at this time.
0 commit comments