Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'undefined' on real device with iOS 16, while working on iOS 18 simulator #109

Open
JaDenis opened this issue Dec 17, 2024 · 1 comment
Open

Comments

@JaDenis
Copy link

JaDenis commented Dec 17, 2024

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
}
@Tang-Hai
Copy link

I also encountered this issue. Have you solved it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants