asciitree
asciitree copied to clipboard
Handle first child specially
Closes https://github.com/mbr/asciitree/issues/10
Adds first_child_head
and first_child_tail
to Style
and implements them in a compatible way for BoxStyle
. Updates LeftAligned
to handle the first child with these special methods.
Still need to resolve the case of having only one child. Namely does it go through first or last or possibly both and why.
Made the only child case a special case that can also be overridden.
Also updated all styles to define these functions in a way that is compatible with their existing behavior.
While this technically works and passes the tests, I'm not sure that it is helpful for solving my problem yet. Am trying to generate some HTML and CSS to make a visualization like this one (item 4) The code being generated needs to look something like this, but was having a hard time getting that behavior out of these functions. Ended up rolling my own function, but it would be better if that wasn't necessary.
Opened issue ( https://github.com/mbr/asciitree/issues/12 ) based on the last point. Namely handling cases of having or not having children specially.