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

Consider using lowlight #66

Open
wooorm opened this issue May 30, 2019 · 1 comment
Open

Consider using lowlight #66

wooorm opened this issue May 30, 2019 · 1 comment

Comments

@wooorm
Copy link

wooorm commented May 30, 2019

Hi! 👋 I actually don’t use Swift, or this project, but I have spent time thinking about a similar problem: how to use highlight.js if not compiling to HTML.

Highlight.js (and Prism, another popular highlighter in JS) rely heavily on HTML, but I built lowlight and refractor to work around that. Instead, they return JSON, which you could use to create NS strings instead so you don’t need an HTML parser!

This is also what’s used in react-syntax-highlighter and react-native-syntax-highlighter

Anyway, just an idea, feel free to close!

@raspu
Copy link
Owner

raspu commented Jun 3, 2019

That is actually really interesting, I will try to find some time to play with 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