2025-02-28 19:25:14 +01:00

18 lines
498 B
Swift

struct OtherCodeBlock {
private let codeHighlightFooter = "<script> document.addEventListener('DOMContentLoaded', () => { 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
}
}