2025-01-06 10:00:51 +01:00

19 lines
429 B
Swift

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)
}
}