Request Article for Syntax Highlighting in Drupal

Tejan Ausland's picture

I noted that you recently added syntax highlighting for code to the site. Can we get an article on how to do that?

WisTex's picture

What is Syntax Highlighting

Syntax highlighting is basically a method of color-coding different parts of computer code so that it is easier for a programmer to read. It helps the coder identigy different aspects of the code, and also makes it obvious when certain typos occur, like a missing quotation mark.

Probably the best way is to show you.

Without syntax highlighting, a piece of code might look like this:

<div class="messages status">
<p style="text-align: center;">Status Message Goes Here</p>
</div>

But with syntax highlighting, it would look like this:

<div class="messages status">
<p style="text-align: center;">Status Message Goes Here</p>
</div>

Scott M. Stolz
Complete Hosting Guide, Editor-in-Chief
WisTex, Director & CEO