• 5,811,995
    REGISTERED
  • 50,507
    ONLINE NOW

Code Syntax Highlighting Enabled in the Forums

Code Syntax Highlighting Enabled in the Forums

We’ve just added a handy new feature to the forums for those who like to present code for others to view. For a while now, you’ve been able to use the [code][/code] markers to wrap code in a container. Now, you can specify what type of code you’re using to enable syntax highlighting, as shown in the attached image.

To enable this, use (in the case of javascript): [code=javascript][/code].¬†Other languages you can specify include¬†js, css, c, cc, cpp, json, cs, java, bash, bsh, csh, sh, cv, py, python, perl, pl, rb, ruby, coffee, and rust. If you don’t want syntax highlighting, you can still use [code][/code] as usual.

Happy coding!

_________
Want something on the XDA Portal? Send us a tip! -- Join us for xda:devcon 2014!
Advertisment
Advertisement

XDA TV: Most Recent Video

Buy/Sell on Swappa

  • Nexus 5 (Unlocked) buy | sell
  • Galaxy Note 3 (T-Mobile) buy | sell
  • HTC One M7 (Verizon) buy | sell
  • Galaxy S 5 (Unlocked) buy | sell
  • Nexus 7 2013 buy | sell
  • Swappa is the official marketplace of XDA