feat: Adds stack separators, removes some unused nodes from cli-doc module
All checks were successful
CI / Run tests. (push) Successful in 52s

This commit is contained in:
2024-12-08 10:58:03 -05:00
parent c977a1c805
commit c6a269f062
12 changed files with 229 additions and 177 deletions

View File

@@ -12,16 +12,6 @@ struct CliDocTests {
return true
}()
@Test
func testNote() {
#expect(setupRainbow)
let note = Note(content: "Some note.")
let expected = """
\("NOTE:".yellow.bold) Some note.
"""
#expect(note.render() == expected)
}
@Test
func testExamples() {
#expect(setupRainbow)
@@ -95,7 +85,7 @@ extension ExampleSectionStyle where Self == DefaultExampleSectionStyle<CustomExa
struct CustomExampleOnlyStyle: ExampleStyle {
func render(content: ExampleConfiguration) -> some TextNode {
VStack(separator: .newLine(count: 2)) {
VStack {
content.examples.map { example in
VStack {
example.label.red
@@ -103,5 +93,6 @@ struct CustomExampleOnlyStyle: ExampleStyle {
}
}
}
.separator(.newLine(count: 2))
}
}