Update icons, hide page title

This commit is contained in:
Christoph Hagen
2024-12-26 15:01:01 +01:00
parent 1e4682dad1
commit 922ba4ebe7
23 changed files with 290 additions and 53 deletions

View File

@ -0,0 +1,25 @@
struct IconCommandProcessor: CommandProcessor {
let commandType: ShorthandMarkdownKey = .icons
let results: PageGenerationResults
init(content: Content, results: PageGenerationResults) {
self.results = results
}
func process(_ arguments: [String], markdown: Substring) -> String {
var icons = [PageIcon]()
for argument in arguments {
guard let icon = PageIcon(rawValue: argument) else {
results.invalid(command: .icons, markdown)
continue
}
icons.append(icon)
}
results.require(icons: icons)
return ""
}
}