f0rki / mapping-high-level-constructs-to-llvm-ir

A guide that explains how high level programming language constructs are mapped to the LLVM intermediate language.
https://mapping-high-level-constructs-to-llvm-ir.readthedocs.io
Other
599 stars 62 forks source link

gitbook doesn't highlight llvm ir syntax #9

Closed f0rki closed 6 years ago

f0rki commented 8 years ago

This makes it not so nice to read.

Maybe

archfrog commented 8 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. 2016-10-26 10_05_22-mapping-high-level-constructs-to-llvm-ir_listing_0 ll at master f0rki_mapping-

f0rki commented 8 years ago

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

archfrog commented 8 years ago

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?

f0rki commented 8 years ago

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.

archfrog commented 8 years ago

Okay, thanks :)

f0rki commented 8 years ago

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.

f0rki commented 8 years ago

Tried to switch to the gitbook pygments plugin with 4585e4d76c846feeb0c3477a1e8dabab3f1cbb01 . works fine locally, but no pygments on the gitbook build server...

f0rki commented 7 years ago

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.

f0rki commented 7 years ago

Turns out gitbook.com is super slow in incorporating new highlightjs versions... I openend a pull request: GitbookIO/plugin-highlight/pull/9

f0rki commented 6 years ago

I switched to readthedocs.

https://mapping-high-level-constructs-to-llvm-ir.readthedocs.io