Village Pump:Home/Syntax Highlighting ( archived 2009-06-18 ): Difference between revisions

→‎Code tag change: '''lang''' tag explanation.
(→‎Code tag change: '''lang''' tag explanation.)
Line 47:
: It seems color themes have changed for quite a number of languages...perhaps we should decide on a favorite theme, and then use that for every language? Would take quite a bit of work though... --[[User:Mbishop|Mbishop]]
:: Should be fixed. The upgrade in versions of GeSHi obliterated a configuration change I'd forgotten I made. I need to make a list of these things. As for a common color scheme, I'm all for it. GeSHi is now set to apply different CSS classes to the different code concepts it's familiar with. The current theme is set in [[Mediawiki:Common.css]], and can be changed sitewide by modifying that. --[[User:Short Circuit|Short Circuit]] 20:21, 24 January 2009 (UTC)
 
 
==Switch!! <code> is now <lang>==
I realize we just switched, but it has been pointed out that '''code''' is already an HTML element, and appropriating that tag for wiki text will cause problems for folks who sprinkle HTML into their edits. (Shame on them. ;-) )
 
Anyhow, you can now use <lang c>/* some C code */<lang> the same way you would have used <code>. Like so:
 
<lang perl>print scalar @ARGV</lang>
 
Sorry for the inconvenience and the flip-flopping. Had to do this soon, before the entire site managed to switch. On the bright side, with the changes I made to GeSHiCodeTag, it will be very, very obvious which examples need to be switched. I also noticed that Mediawiki reinterprets the output of code tags, so I may be able to insert category references automagically. Need to look into this further... --[[User:Short Circuit|Short Circuit]] 21:03, 29 January 2009 (UTC)
 
==Adding new languages==