Closed f0rki closed 6 years ago
Strange, when I open an LLVM IR file from the repository, it is highlighted properly. I am using Chrome, which browser are you using?
Please see the attached screen capture.
yes github does highlight it properly, but not gitbooks.io --> see e.g. https://f0rki.gitbooks.io/mapping-high-level-constructs-to-llvm-ir/content/mapping-basic-constructs-to-llvm-ir/global-variables.html
Oh, bummer :-)
Are you good at JavaScript? I have no experience in it. The only solution seems to be to add support for LLVM IR to highlight.js. I've tried adding languages to other syntax highlighters and it usually takes like a single evening to do. I can take a shot at it or do you prefer to do it?
I wouldn't say that I'm good at JavaScript, but I think I can manage to do it. I guess I can use the one from github or pygments as a base.
Okay, thanks :)
Pull request for highlight.js at https://github.com/isagalaev/highlight.js/pull/1337
Now we have to wait until gitbook integrates this... I'm waiting till then to close this issue.
It seems like there are a lot of open pull requests, maybe we can use the addcssjs gitbook plugin to load a custom highlightjs until it's merged.
Tried to switch to the gitbook pygments plugin with 4585e4d76c846feeb0c3477a1e8dabab3f1cbb01 . works fine locally, but no pygments on the gitbook build server...
My pull request for highlight.js at isagalaev/highlight.js#1337 was finally merged. Now we just have to wait for a release or gitbook to integrate it.
Turns out gitbook.com is super slow in incorporating new highlightjs versions... I openend a pull request: GitbookIO/plugin-highlight/pull/9
I switched to readthedocs.
https://mapping-high-level-constructs-to-llvm-ir.readthedocs.io
This makes it not so nice to read.
Maybe
ll
as language tag is wrong.