Village Pump:Home/Syntax Highlighting ( archived 2009-06-18 ): Difference between revisions
Content deleted Content added
→Switch!! <code> is now <lang>: Aww man I already started |
→Code tag change: updates |
||
Line 9: | Line 9: | ||
Code will be denoted as: |
Code will be denoted as: |
||
< |
<lang C>(some code)<code> |
||
This will significantly clean up the Mediawiki extension namespace, and make formatting tricks with CSS easier. I'd rather create an attribute to <pre>, but that appears as though it could be more complicated. --[[User:Short Circuit|Short Circuit]] 05:52, 2 July 2008 (UTC) |
This will significantly clean up the Mediawiki extension namespace, and make formatting tricks with CSS easier. I'd rather create an attribute to <pre>, but that appears as though it could be more complicated. --[[User:Short Circuit|Short Circuit]] 05:52, 2 July 2008 (UTC) (updated) --[[User:Short Circuit|Short Circuit]] 21:59, 29 January 2009 (UTC) |
||
:Will we need to go and change all of the previous highlighting then? --[[User:Mwn3d|Mwn3d]] 06:11, 2 July 2008 (UTC) |
:Will we need to go and change all of the previous highlighting then? --[[User:Mwn3d|Mwn3d]] 06:11, 2 July 2008 (UTC) |
||
::Yes. Both approaches will be supported for a little while, I expect, but the current system will definitely be phased out. --[[User:Short Circuit|Short Circuit]] 23:42, 2 July 2008 (UTC) |
::Yes. Both approaches will be supported for a little while, I expect, but the current system will definitely be phased out. --[[User:Short Circuit|Short Circuit]] 23:42, 2 July 2008 (UTC) |
||
Line 24: | Line 24: | ||
::::Also it would need a regular expression for comments. It would probably be best to talk to the people working on [http://sourceforge.net/projects/geshi/ the GeSHi project] about adding new languages.--[[User:Mwn3d|Mwn3d]] 16:29, 7 July 2008 (UTC) |
::::Also it would need a regular expression for comments. It would probably be best to talk to the people working on [http://sourceforge.net/projects/geshi/ the GeSHi project] about adding new languages.--[[User:Mwn3d|Mwn3d]] 16:29, 7 July 2008 (UTC) |
||
: It's happened! I've replaced the GeSHiSyntaxHighlight Mediawiki extension with the GeSHiCodeTag extension. The old tag format works (for now), but it ''will'' be removed as soon as possible. All tags of <nowiki>< |
: It's happened! I've replaced the GeSHiSyntaxHighlight Mediawiki extension with the GeSHiCodeTag extension. The old tag format works (for now), but it ''will'' be removed as soon as possible. All tags of <nowiki><mylang>some_code<mylang></nowiki> need to be changed to <nowiki><lang mylang>some_code</lang></nowiki>. So this block: |
||
<cpp>#include <stdio> |
<cpp>#include <stdio> |
||
int main() |
int main() |
||
Line 33: | Line 33: | ||
: Should be rewrapped like this: |
: Should be rewrapped like this: |
||
< |
<lang cpp>#include <stdio> |
||
int main() |
int main() |
||
{ |
{ |
||
std::cout << "Hi!" << std::endl; |
std::cout << "Hi!" << std::endl; |
||
return 0; |
return 0; |
||
}</ |
}</lang> |
||
: This is going to require a massive site-wide effort for all supported languages. See [[Help:GeSHi]] for details. As soon as we're confident most of the pages have been handled, I'll disable support for <nowiki><lang></nowiki> entirely. --[[User:Short Circuit|Short Circuit]] 02:33, 23 January 2009 (UTC) |
: This is going to require a massive site-wide effort for all supported languages. See [[Help:GeSHi]] for details. As soon as we're confident most of the pages have been handled, I'll disable support for <nowiki><lang></nowiki> entirely. --[[User:Short Circuit|Short Circuit]] 02:33, 23 January 2009 (UTC) |
||
:: When the <nowiki><lang></nowiki> tags are removed, [[Special:Version]] will not any more list all the languages in the tags section, right? Maybe there should be a (perhaps auto-generated) page listing all supported languages (or maybe it's even possible to include them in [[Special:Version]] as separate section). Or maybe there's already such a list somewhere, which I simply didn't notice? --[[User:Ce|Ce]] 08:18, 23 January 2009 (UTC) |
:: When the <nowiki><lang></nowiki> tags are removed, [[Special:Version]] will not any more list all the languages in the tags section, right? Maybe there should be a (perhaps auto-generated) page listing all supported languages (or maybe it's even possible to include them in [[Special:Version]] as separate section). Or maybe there's already such a list somewhere, which I simply didn't notice? --[[User:Ce|Ce]] 08:18, 23 January 2009 (UTC) |
||
Line 45: | Line 45: | ||
:::: I just noticed this too (when writing my task [[N distinct objects]]). Since &code> being inline is defined by the HTML specification, to be inline, we should not redefine it to be block. --[[User:Kevin Reid|Kevin Reid]] 00:48, 29 January 2009 (UTC) |
:::: I just noticed this too (when writing my task [[N distinct objects]]). Since &code> being inline is defined by the HTML specification, to be inline, we should not redefine it to be block. --[[User:Kevin Reid|Kevin Reid]] 00:48, 29 January 2009 (UTC) |
||
:::::You should use the <nowiki><tt></nowiki> tag instead. --[[User:Mwn3d|Mwn3d]] 01:57, 29 January 2009 (UTC) |
:::::You should use the <nowiki><tt></nowiki> tag instead. --[[User:Mwn3d|Mwn3d]] 01:57, 29 January 2009 (UTC) |
||
:::::Sorta Fixed. We now use <lang mylang> instead of <code mylang>. <code> will remain broken until the existing pages are fixed. --[[User:Short Circuit|Short Circuit]] 21:59, 29 January 2009 (UTC) |
|||
: 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]] |
: 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) |
:: 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>== |
==Switch!! <code> is now <lang>== |