[tw5] Railroad diagram: my approach to segmenting railroads that are too wide

I added some custom syntax /“BR”/ I can use to generate multiple railroad diagrams from one big chunk of text.

is the text for the railroad diagram(s).

<$list filter="""[<rdg>split[/"BR"/]]""">
<$railroad text=<<currentTiddler>>/>
</$list>

1 Like

Unsatisfied. The tweak:

<$list filter="""[<rdg>split[/"BR"/]]""" counter=index>
<div style={{{ [<index>match[1]else[margin-left:100px;]]}}}><div style={{{ [[margin-left:]] [<currentTiddler>split[PAD"/]first[]split[/"]last[]else[0]] [[px;]] +[join[]] }}}><$railroad text={{{ [<currentTiddler>search-replace:g:regexp<pad>,[]] }}}/></div></div>
</$list>

Iterative and incremental tweaking. Refining requirements in a “paint the picture and ask: is this what you mean? No, then tweak and repeat” process.

Come to realize looking at that last syntax diagram: nah, I want this chunk to be optional. So tweak:

Next: editor buttons for the railroad diagram. Because who wants to type in all of that notation bleurk…

The march towards a helpful editor for railroad diagrams:

1 Like