So, I want to use chromafi to provide highlighting for Solidity. Now, Solidity is not presently in highlight.js (it likely soon will be, but I don't know how soon, and I have good reason to want this quickly and not have to wait there).
Fortunately, I can highlight Solidity with highlight.js by means of the highlightjs-solidity project, allowing me to register Solidity with my hljs object. Unfortunately, I have no way to use this in chromafi, since chromafi doesn't allow using a custom hljs object that might have additional languages registered.
I see two possible ways of remedying this:
- Provide some way for the user to pass in a custom
hljs object, on which they might have registered additional languages (or made other changes -- maybe they want custom highlighting for one of the standard languages!).
- Don't allow that, but instead expose as exports some of what are currently purely internal functions, so that the user can, on their own, use their custom
hljs object to get the XML-based highlighting, and then can pass the result into these lower-level functions you've now exposed, to achieve the same result.
(And maybe there's some other way I've failed to think of.)
In any case, any way of allowing the user to not be limited to hljs's current built-in languages would be appreciated. Thank you!
So, I want to use chromafi to provide highlighting for Solidity. Now, Solidity is not presently in highlight.js (it likely soon will be, but I don't know how soon, and I have good reason to want this quickly and not have to wait there).
Fortunately, I can highlight Solidity with highlight.js by means of the highlightjs-solidity project, allowing me to register Solidity with my
hljsobject. Unfortunately, I have no way to use this in chromafi, since chromafi doesn't allow using a customhljsobject that might have additional languages registered.I see two possible ways of remedying this:
hljsobject, on which they might have registered additional languages (or made other changes -- maybe they want custom highlighting for one of the standard languages!).hljsobject to get the XML-based highlighting, and then can pass the result into these lower-level functions you've now exposed, to achieve the same result.(And maybe there's some other way I've failed to think of.)
In any case, any way of allowing the user to not be limited to hljs's current built-in languages would be appreciated. Thank you!