What are the possible module candidates for highlighting the source code shown in a node? Is there any module that does the task using Javascript?
I currently use GeSHi Filter for syntax highlighting for my personal code dumping ground and found it pretty useful. Some more details about this module (from its project page):
The GeShi Filter module provides a filter for source code syntax highlighting for a wide range of languages.
Source code can be entered with for example
<code type="java">...</code>
or<blockcode language="python">...</blockcode>
. Starting from version 5.x-2.0 it is also possible to define your own generic and language specific tags (e.g.<java>
) or to work with square bracket style tags (e.g.[python]
). Automatically adding line numbers is possible too with for example[ruby linenumbers="normal"]
.