ChWebsiteApp/CHDataManagement/Generator/Blocks/OtherCodeProcessor.swift
2025-01-06 01:17:06 +01:00

18 lines
443 B
Swift

struct OtherCodeProcessor {
private let codeHighlightFooter = "<script>hljs.highlightAll();</script>"
let results: PageGenerationResults
init(results: PageGenerationResults) {
self.results = results
}
func process(html: String) -> String {
results.require(header: .codeHightlighting)
results.require(footer: codeHighlightFooter)
return html // Just use normal code highlighting
}
}