Swiftpack.co - nkristek/Highlight as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by nkristek.
nkristek/Highlight 0.4.0
A syntax highlighter for JSON data completely written in Swift with no dependencies
⭐️ 37
🕓 2 years ago
iOS macOS
.package(url: "https://github.com/nkristek/Highlight.git", from: "0.4.0")

Highlight

CI Status

This library provides a syntax highlighter which currently supports highlighting JSON data. It is fully written in Swift and there are no additional dependencies. It uses a compatibility layer for colors and fonts for UIKit and AppKit and the default theme supports dark mode on both platforms.

Features

This library provides a JsonSyntaxHighlightProvider which can either be instanciated or accessed through a static instance JsonSyntaxHighlightProvider.shared.

It parses the given String and highlights the given NSMutableAttributedString by setting the color and font on specific areas.

Installation

Currently supported methods of importing it:

Contribution

If you find a bug feel free to open an issue. Contributions are also appreciated.

GitHub

link
Stars: 37
Last commit: 2 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

0.4
2 years ago
  • Parse member keys as separate token #6 (kudos to @krzyzanowskim)

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics