raspu / Highlightr

iOS & OSX Syntax Highlighter.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to add new languages?

ActuallyTaylor opened this issue · comments

Problem

I have tried to replace the Highlight.min.js with a new file generated from compiling Highlight.js with the command
node tools/build.js jelly swift json javascript
This outputs a highlight.min.js file. When I replace the highlight.min.js file inside of Highlightr, it returns nil after instantiating the Highlightr class.

Question

How should I go about adding languages? Is there a different command I have to run inside the Highlight.js project or is there a completely different way of adding languages for this fork?

commented

@ActuallyTaylor Did you find a way to add new languages?

@nkleemann I did not, I moved on to creating my own text editor for iOS

@ActuallyTaylor @nkleemann
Well, sorry for not replying to this 😓... When I was still maintaining this I was using this to build it:

node tools/build.js -t cdn 

Make sure you use the cdn variant, as we don't want the library to expect a browser environment. I really hope this still works!