Refactor page content generators

This commit is contained in:
Christoph Hagen
2025-01-06 10:00:51 +01:00
parent 245534e989
commit 301dbad0a5
36 changed files with 760 additions and 566 deletions

View File

@ -0,0 +1,18 @@
protocol CommandProcessor {
static var commandType: CommandType { get }
var results: PageGenerationResults { get }
init(content: Content, results: PageGenerationResults, language: ContentLanguage)
func process(_ arguments: [String], markdown: Substring) -> String
}
extension CommandProcessor {
func invalid(_ markdown: Substring) {
results.invalid(command: Self.commandType, markdown)
}
}