If you are wondering what Photon offers that another syntax highlighter does not, welcome to this page.
Here are no biased opinions, just a few screenshots of some alternative syntax highlighters. Each project has its own strengths and we believe that we must show ours.
Neither do we intend to criticize these awesome libraries, which aside from being open source, community-based and used in thousands of projects, have served as inspiration.
If any result is wrong, you can tell us at github.com/photonsh/issues{target="_blank"}.
We have used the following popular libraries to create the comparison:
- Prism{target="_blank"} 1.6.0.
- Highlight.js{target="_blank"} 9.11.0.
To make examples look similar we have used a few CSS rules to reset some values like spacing and fonts.
code, pre {
font-size: 12px !important;
line-height: 18px !important;
font-family: monospace !important;
margin: 0 !important;
padding: 0 !important;
border-radius: 0 !important;
}
code {
padding: 24px !important;
}
code {
display: block !important;
}
div.psh {
margin: 0 !important;
}
In this round we test JavaScript syntax highlighting.
Themes are the default one for each proyect.
In this round we test Python syntax highlighting.
Themes are Monokai or similar version.
In this round we test PHP syntax highlighting.
Themes are GitHub or similar version.
In this round we test Ruby syntax highlighting.
Themes are Solarized Light or similar version.