I am not asking how to generate it, but rather how to format it. Is there any set of characters that is meant for that purpose? My intuitive approach was to have the options with the following values:
master
|-- foo 1
|-- foo 2
|-- bar 1
The box drawing characters are meant for purposes like this, more or less. At the minimum, you would use U+251C BOX DRAWINGS LIGHT VERTICAL AND RIGHT “├” and U+2500 BOX DRAWINGS LIGHT HORIZONTAL“─”. For example,
However, it will be difficult to get the symbols aligned well. Using no-break spaces as above is a coarse tool, and most importantly, character widths vary—so you might consider using a CSS rule like
to get more predictable rendering.