feat: Adds stack separators, removes some unused nodes from cli-doc module
All checks were successful
CI / Run tests. (push) Successful in 52s
All checks were successful
CI / Run tests. (push) Successful in 52s
This commit is contained in:
@@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user