I recently started exploring syntax coloring and discovered that I can color Befunge code a certain way that makes it look better (IMO). Is there some way of creating syntax coloring for this site?

Or perhaps a user-script (how does one make those)?

There seem to be a few languages who don't have syntax colorings:

  • GolfScript
  • Befunge
  • Processing

Could we create colorings for them too?

Related: Add line-height shortener to the ascii-art tag

Proposed syntax coloring for Befunge (character by character):

"'()@[]{}                                               <span class="str"></span>
0123456789+-*%/                                         <span class="lit"></span>
$=\_|~& ^><v?                                           <span class="kwd"></span>
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuwxy#;    <span class="com"></span>
`.,: !z                                                 <span class="pln"></span>

1 Answer 1


Concerning the idea of making SE to create additional syntax highlighting for the site you will have to ask on metaSO. Now, there are several things to take into account:

  • SE uses Google Code Prettify to render syntax highlighting, so the language you want to add needs to be available as an extension to this;
  • All people visiting any pages on the site will have to load that extension at every page loaded, so it needs to be worth it (high number of posts needing it), light-weight (see this thread for instance) and a clear improvement as, for many language, the 'default' syntax highlighting (the one triggered by <!--language: default --> or by any lang-* that exists but is not yet implemented like typically lang-r) does already a good job (recognize comments, common control flow like ifand while and recognize string).

FYI you have a list of currently implemented SH here.

NB: I'm currently campaigning on meta to get syntax highlighting for R on SO, so I did some research on that recently, hence my answer.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .