Commit a51fe49
committed
Render
There are two ways to render a "zero or more" (i.e. `*`) repeat. One
is to put nothing on the main forward line and to put the pattern on
the recurrent edge, and the other is to put the pattern on the main
forward line and to have an empty recurrent edge and an empty bypass
edge.
That is, for the latter, we can think of `thing*` as `(thing+)?`.
Doing it that latter way means an additional edge, but it buys us
something big in return, which is that it keeps all the patterns going
in the forward direction. Doing it the other way means the patterns
have to be reversed so as to put them underneath on that recurrent
edge, and it means that readers then have to read them right to left.
Reversing the elements also causes a bug in some diagrams where the
lines end up running in opposing directions and so the trains crash
into each other. See:
- #1787 (comment)
Keeping things in the forward direction avoids this problem.
In this commit, we'll leave in place all the infrastructure for
reversing the elements though it is no longer used. We can of course
pull this out later.* repeats in forward direction1 parent 8994838 commit a51fe49
1 file changed
+4
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
| 166 | + | |
| 167 | + | |
171 | 168 | | |
172 | 169 | | |
173 | | - | |
174 | | - | |
| 170 | + | |
| 171 | + | |
175 | 172 | | |
176 | 173 | | |
177 | 174 | | |
| |||
0 commit comments