It would be nice to use syntax highlighting on Ethereum Stack Exchange for our questions and answers. Stack Exchange uses google/code-prettify.

For the development question regarding decentralized applications, the lang-js hint would be sufficient in most cases, however, there are more than 700 questions tagged with solidity which could benefit a prettify plugin.

Who can create javascript code prettify syntax highlighting plugins for solidity and serpent? lang-sol, lang-se?

It would be great if someone can step up and create pull requests for the Ethereum programming languages directly at the google repository.

If we can get it included, we can request default syntax highlighing for Ethereum Stack Exchange.

See also, Syntax highlighting language hints.

Edit: If you think we need more languages added for Ethereum, comment below.

up vote 3 down vote accepted

I created a pull request for Solidity: https://github.com/google/code-prettify/pull/464

  • Thanks a lot. I'll subscribe to track progress. Don't forget to sign the "CLA" :-) – Afri Dec 29 '16 at 19:49
  • If you don't mind I can commit your contribution with my account. This way your copyright will be untouched, but we can trick that google bot :) – Afri Jan 21 '17 at 15:31

I'd like to see JavaScript highlighting too. It doesn't seem to work on this question: Convert input in in ether in HTML object to Wei to send to smart contract using web3 Should it?

  • If you have another question, please ask it by clicking the Ask Question button. – Afri Aug 10 '17 at 10:59
  • Check the linked thread from above how to highlight JavaScript: meta.stackexchange.com/questions/184108/… – Afri Aug 10 '17 at 11:00
  • I did that, and I saw the above, so I assumed that syntax highlighting is turned off on this site. Is it? If it is supposed to work and I am just using it wrongly, I'll be glad to open a new Meta question. – dcorking Aug 10 '17 at 11:11
  • 1
    Yes, I just noticed it's already there. Strange. Please create a new Meta question and tag it with support. Thanks! – Afri Aug 10 '17 at 11:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .