Syntax Highlighter

by Lummox JR
[Share] [Zip]
ID:86949
 
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.
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.