Skip to content

purkylin/libprisma

Repository files navigation

image

This is a Telegram libprisma wrapper, you can highghlight code native with super fast speed.

How to update languages

Generate a new dat file and replace it.

Platform support

  • iOS
  • macOS
  • Others(untested)

Install

  • SPM
dependencies: [
    .package(url: "https://github.com/purkylin/libprisma", .upToNextMajor(from: "0.1.0"))
]

Usage

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)