feat: Adds vertical and horizontal separators, renames modifier protocol.

This commit is contained in:
2024-12-05 22:38:42 -05:00
parent bef91c5277
commit 9985b55f88
15 changed files with 253 additions and 93 deletions

View File

@@ -9,17 +9,6 @@ func array(from node: any TextNode) -> [any TextNode] {
}
}
@usableFromInline
func seperator(_ separator: String, count: Int) -> any TextNode {
assert(count >= 0, "Invalid count while creating a separator")
var output = ""
for _ in 0 ... count {
output += separator
}
return output
}
extension Array where Element == (any TextNode) {
@usableFromInline