0

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?

apaderno
  • 28,547
  • 16
  • 75
  • 90

2 Answers2

2

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"].

Community
  • 1
  • 1
digital
  • 2,079
  • 3
  • 25
  • 35
0

There is also Chili Highlighter, which allows to highlight code from browser side.

apaderno
  • 28,547
  • 16
  • 75
  • 90