Have anyone encountered 'undefined' error?
It works fine in simulator, but on device I get 'undefined'
Please help, I'm trying to debug in the meantime: latest suspicion is JavaScriptCore on iOS 16 is incpompatible with highlightr.js code
if let highlightr = Highlightr() {
highlightr.setTheme(to: "dark")
let code = "import UIKit"
// You can omit the second parameter to use automatic language detection.
let highlightedCode = highlightr.highlight(code)
self.textView.attributedText = highlightedCode
}
Have anyone encountered 'undefined' error?
It works fine in simulator, but on device I get 'undefined'
Please help, I'm trying to debug in the meantime: latest suspicion is JavaScriptCore on iOS 16 is incpompatible with highlightr.js code