PrismJS! I tried out the other two, Prettify and SyntaxHighlighter, and I just preferred the look of PrismJS.
Prism had a lot more themes to choose from and pretty good language support. I've included some examples
below of how some code in 3 different languages might appear. I'm assuming most of what I post will be in
Python or C/C++, but occasionally I mess around with Go, Erlang and Scala, so those might also make an
appearance on the site. Unfortunately there is no Scala or Erlang support, so I might just have to add it . . .
C++
Python
Scala (PrismJS doesnt actually support scala, so this is with Java highlighting)
C++
#include <iostream>
int main() {
std::cout << "Hello, world!" << std::endl;
return (0);
}
Python
def hello_world():
print("Hello, world!")
if __name__ == '__main__':
hello_world()
Scala (PrismJS doesnt actually support scala, so this is with Java highlighting)
def factorial(n: Int): Int = {
if (n == 0)
return 1
else
return n * factorial(n - 1)
}
PrismJS
syntax highlighting