1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2025-10-25 20:57:39 +00:00

Make some visual changes

This commit is contained in:
bouncepaw
2021-01-10 18:01:38 +05:00
parent 0c86b65e35
commit 09fa2b0716
3 changed files with 13 additions and 5 deletions

View File

@@ -5,6 +5,8 @@ import (
"path"
"sort"
"strings"
"github.com/bouncepaw/mycorrhiza/util"
)
// If Name == "", the tree is empty.
@@ -23,7 +25,7 @@ type tree struct {
func Tree(hyphaName string, hyphaIterator func(func(string))) (html, prev, next string) {
t := &tree{name: hyphaName, root: true, hyphaIterator: hyphaIterator}
t.fill()
return t.asHtml(), t.prevSibling, t.nextSibling
return t.asHtml(), util.BeautifulName(t.prevSibling), util.BeautifulName(t.nextSibling)
}
// subtree adds a descendant tree to `t` and returns that tree.