Skip to content

Commit fdccac2

Browse files
committed
Release 1.9.0
1 parent afb7a22 commit fdccac2

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

Diff for: CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [1.9.0] - 2019-01-22
8+
### Fixed
9+
- Improved detection for recursion and roots
10+
711
## [1.8.2] - 2019-01-21
812
### Changed
913
- Updated example outputs

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ebnf2railroad",
3-
"version": "1.8.2",
3+
"version": "1.9.0",
44
"description": "EBNF to Railroad diagram",
55
"keywords": [
66
"ebnf",

Diff for: src/toc.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,12 @@ const createStructuralToc = ast => {
7373
// b -> c -> a -> b, vs.
7474
// c -> a -> b -> c. Check which one is defined first, that one wins
7575
.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+
8282
return index < childIndex;
8383
});
8484

0 commit comments

Comments
 (0)