wip
This commit is contained in:
21
Sources/CliDoc2/Nodes/ShellCommand.swift
Normal file
21
Sources/CliDoc2/Nodes/ShellCommand.swift
Normal file
@@ -0,0 +1,21 @@
|
||||
public struct ShellCommand<Content: TextNode>: TextNode {
|
||||
|
||||
@usableFromInline
|
||||
var symbol: any TextNode
|
||||
|
||||
@usableFromInline
|
||||
var content: Content
|
||||
|
||||
@inlinable
|
||||
public init(
|
||||
symbol: any TextNode = "$",
|
||||
@TextBuilder content: () -> Content
|
||||
) {
|
||||
self.symbol = symbol
|
||||
self.content = content()
|
||||
}
|
||||
|
||||
public var body: some TextNode {
|
||||
Group(content: [symbol, content], separator: " ")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user