runtimeverification / iele-semantics

Semantics of Virtual Machine for IELE prototype blockchain
Other
131 stars 33 forks source link

Switch the syntax highlighting to Prismjs #209

Closed shd101wyy closed 3 years ago

shd101wyy commented 3 years ago

Fixed: https://github.com/runtimeverification/web-common/issues/87

Please make sure https://github.com/runtimeverification/iele-semantics/pull/206 is merged before this PR gets reviewed and merged.

Demo: https://shd101wyy.github.io/iele-semantics/


This PR switched the syntax highlighter library from highlight.js to prismjs.

This PR added syntax highlighting for the following languages in the rendered HTML pages from Markdown.

This PR also fixed some dark mode issue.


You could simply highlight iele in markdown with the following notation:

```iele
contract ERC20 {

  // constant used for shifts
  @addressShift = 160
  ...


and it will show the result like below:

![Screenshot from 2020-11-16 19-04-24](https://user-images.githubusercontent.com/1908863/99245560-baae4a80-283e-11eb-8704-d4a79dfba523.png)