File tree 3 files changed +11
-7
lines changed
3 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
4
4
The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
5
5
and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
6
6
7
+ ## [ 1.9.0] - 2019-01-22
8
+ ### Fixed
9
+ - Improved detection for recursion and roots
10
+
7
11
## [ 1.8.2] - 2019-01-21
8
12
### Changed
9
13
- Updated example outputs
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " ebnf2railroad" ,
3
- "version" : " 1.8.2 " ,
3
+ "version" : " 1.9.0 " ,
4
4
"description" : " EBNF to Railroad diagram" ,
5
5
"keywords" : [
6
6
" ebnf" ,
Original file line number Diff line number Diff line change @@ -73,12 +73,12 @@ const createStructuralToc = ast => {
73
73
// b -> c -> a -> b, vs.
74
74
// c -> a -> b -> c. Check which one is defined first, that one wins
75
75
. filter ( ( root , index , list ) => {
76
- const childIndex = Math . min (
77
- flatList ( root . children || [ ] )
78
- . filter ( node => node !== root . name )
79
- . map ( node => list . map ( p => p . name ) . indexOf ( node ) )
80
- . filter ( e => e !== - 1 )
81
- ) ;
76
+ const indices = flatList ( root . children || [ ] )
77
+ . filter ( node => node !== root . name )
78
+ . map ( node => list . map ( p => p . name ) . indexOf ( node ) )
79
+ . filter ( e => e !== - 1 ) ;
80
+ const childIndex = Math . min ( ... indices ) ;
81
+
82
82
return index < childIndex ;
83
83
} ) ;
84
84
You can’t perform that action at this time.
0 commit comments