Syntax Highlighter

by Lummox JR
Highlight DM code in easy HTML output for chat or CGI applications [More]
To download this library for your Linux/Mac installation, enter this on your command line:

DreamDownload byond://LummoxJR.SyntaxHighlighter##version=3

Emulator users, in the BYOND pager go to File | Open Location and enter this URL:

byond://LummoxJR.SyntaxHighlighter##version=3

944 downloads
Version 3
Date added: Jan 6 2006
Last updated: Jul 29 2009
8 fans
Syntax Highlighter displays DM code in HTML with full highlighting, just like Dream Maker does. (Actually it's better than the current version of DM, because it also highlights identifiers and numbers.) The output is styled with CSS which is fully customizable. Use it for chat, group programming sessions, or on your DMCGI-powered Web site.

Comments

IainPeregrine: (Dec 5 2009, 10:07 am)
Noticed a bug in your syntax highlighter:

Infinite loop suspected--switching proc to background.
If it is not an infinite loop, either do 'set background=1' or set world.loop_checks=0.
proc name: TrimLeadingTabs (/client/highlighter/proc/TrimLeadingTabs)
source file: lummoxjr_syntax_highlighter.dm,122
usr: IainPeregrine (/mob)
src: /client/highlighter (/client/highlighter)
call stack:
/client/highlighter (/client/highlighter): TrimLeadingTabs(" \nclient{ \n\tTopic(href,href...")
IainPeregrine (/client): Topic("action=viewcode;code=\[0x21000...", /list (/list), null)


This occurs when an extra new line (\n) precedes the code to be formatted.