This is a Telegram libprisma wrapper, you can highghlight code native with super fast speed.
Generate a new dat file and replace it.
- iOS
- macOS
- Others(untested)
- SPM
dependencies: [
.package(url: "https://github.com/purkylin/libprisma", .upToNextMajor(from: "0.1.0"))
]
import libprisma
let syntaxHighlighter = Syntaxer()!
let font = UIFont.monospacedSystemFont(ofSize: 17, weight: .regular)
let theme = SyntaxterTheme(dark: false, textColor: UIColor.black, textFont: font, italicFont: font, mediumFont: font)
return syntaxHighlighter.syntax("Your code", language: lang, theme: theme)