Skip to content

Commit bb3e339

Browse files
committed
docs(README): match tree example alignment with list examples
1 parent bc0de5c commit bb3e339

File tree

1 file changed

+25
-26
lines changed

1 file changed

+25
-26
lines changed

README.md

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ Define a new tree.
574574

575575
```go
576576
t := tree.Root(".").
577-
Child("A", "B", "C")
577+
Child("A", "B", "C")
578578
```
579579

580580
Print the tree.
@@ -592,18 +592,18 @@ Trees have the ability to nest.
592592

593593
```go
594594
t := tree.Root(".").
595-
Child("Item 1").
596-
Child(
597-
tree.Root("Item 2").
598-
Child("Item 2.1").
599-
Child("Item 2.2").
600-
Child("Item 2.3"),
601-
).
602-
Child(
603-
tree.Root("Item 3").
604-
Child("Item 3.1").
605-
Child("Item 3.2"),
606-
)
595+
Child("Item 1").
596+
Child(
597+
tree.Root("Item 2").
598+
Child("Item 2.1").
599+
Child("Item 2.2").
600+
Child("Item 2.3"),
601+
).
602+
Child(
603+
tree.Root("Item 3").
604+
Child("Item 3.1").
605+
Child("Item 3.2"),
606+
)
607607
```
608608

609609
Print the tree.
@@ -623,19 +623,18 @@ Trees can be customized via their enumeration function as well as using
623623
enumeratorStyle := lipgloss.NewStyle().Foreground(lipgloss.Color("99")).MarginRight(1)
624624
itemStyle := lipgloss.NewStyle().Foreground(lipgloss.Color("212")).MarginRight(1)
625625

626-
t := tree.
627-
Root("Makeup").
628-
Child(
629-
"Glossier",
630-
"Claire’s Boutique",
631-
"Nyx",
632-
"Mac",
633-
"Milk",
634-
).
635-
Enumerator(tree.RoundedEnumerator).
636-
EnumeratorStyle(enumeratorStyle).
637-
ItemStyle(itemStyle).
638-
RootStyle(lipgloss.NewStyle().Foreground(lipgloss.Color("#04B575")))
626+
t := tree.Root("Makeup").
627+
Child(
628+
"Glossier",
629+
"Claire’s Boutique",
630+
"Nyx",
631+
"Mac",
632+
"Milk",
633+
).
634+
Enumerator(tree.RoundedEnumerator).
635+
EnumeratorStyle(enumeratorStyle).
636+
ItemStyle(itemStyle).
637+
RootStyle(lipgloss.NewStyle().Foreground(lipgloss.Color("#04B575")))
639638
```
640639

641640
Print the tree.

0 commit comments

Comments
 (0)