Please sign in to comment.
Follow pipe characters that are directly beneath slashes
This construction appears in at least one diagram in the Git docs. The main fix here was to add an option to the `/` entry in the `next_steps` hash to say that pipes are allowed to appear directly below slashes, and to add an option to the `|` entry `next_steps` hash that says pipes can be traversed downwards in addition to upwards. But allowing pipes to be traversed in both directions could cause infinite recursion when traversing two pipe characters that are directly on top of each other. So we now keep track of the direction we're traveling along the Y axis as we traverse edges, and each option in the `next_steps` hash now contains an associated direction. This allows us not to switch from moving down a pipe to moving back up it. Fixes #10.
- Loading branch information...
Showing with 42 additions and 21 deletions.