| Author |
Message |
|
| JuNC |
Posted: Fri Jul 21, 2006 9:34 am |
|
|
|
Joined: 21 Jul 2006
Posts: 3
Location: Plymouth, England
|
I've just added a new HowTo, but I couldn't find any easy way to notate code snippets (I just copy'n'pasted the table code from other HowTos). Is there some markup I missed or if not would it be possible to add a simple tag like [code] to automagically markup Erlang source?
EDIT: sorry, should have googled before posting:
http://meta.wikimedia.org/wiki/Syntax_Highlighting_Extension |
|
|
| Back to top |
|
| andreas |
Posted: Fri Jul 21, 2006 10:10 am |
|
|
|
User
Joined: 03 Jul 2006
Posts: 17
|
If I understand your request correct you want syntax high lighting of erlang code in the wiki, and possibly in the forum with use of some simpel tag, like <code></code>.
JuNC wrote: I've just added a new HowTo, but I couldn't find any easy way to notate code snippets (I just copy'n'pasted the table code from other HowTos). Is there some markup I missed or if not would it be possible to add a simple tag like [code] to automagically markup Erlang source?
EDIT: sorry, should have googled before posting:
http://meta.wikimedia.org/wiki/Syntax_Highlighting_Extension |
|
|
| Back to top |
|
| Ludvig |
Posted: Fri Jul 21, 2006 10:16 am |
|
|
|
User
Joined: 20 Jul 2006
Posts: 38
Location: London
|
Since I allso "allmost" just copied the howtos from the old trapexit site there are more things that is not that good looking. The old site used stylesheets to have the codeboxes look more nice but since this is not that easy to do in the wiki it looks a bit strange. If somebody knows how to fix it they are free to help us.
Allso thanks to JuNC for adding new HowTos...keep up the good work |
|
|
| Back to top |
|
| JuNC |
Posted: Fri Jul 21, 2006 10:36 am |
|
|
|
Joined: 21 Jul 2006
Posts: 3
Location: Plymouth, England
|
andreas wrote: If I understand your request correct you want syntax high lighting of erlang code in the wiki, and possibly in the forum with use of some simpel tag, like <code></code>.
Yep, thats right. Something which would highlight the syntax and possibly give the snippet a caption, maybe:
<code caption='Code snippet 1'>
blah() ->
ok.
</code>
The 'code' tag is built-in to media wiki though isn't it? It just seems to be a synonym for 'pre', with a background colour.
Currently I had to copy/paste about 6 lines of table header to make it look the same as the other HowTos.
I didn't know if it was an extension already enabled or something which I missed in the wiki docs. The extension I linked to looks reasonably simple to install/use although it doesn't look like it includes an Erlang mode. Should be simple to write one though.
I'm willing to help out however I can to get this working, for a language site this is quite an important feature . |
|
|
| Back to top |
|
| Ludvig |
Posted: Fri Jul 21, 2006 10:49 am |
|
|
|
User
Joined: 20 Jul 2006
Posts: 38
Location: London
|
JuNC wrote: andreas wrote: If I understand your request correct you want syntax high lighting of erlang code in the wiki, and possibly in the forum with use of some simpel tag, like <code></code>.
Yep, thats right. Something which would highlight the syntax and possibly give the snippet a caption, maybe:
<code caption='Code snippet 1'>
blah() ->
ok.
</code>
The 'code' tag is built-in to media wiki though isn't it? It just seems to be a synonym for 'pre', with a background colour.
Currently I had to copy/paste about 6 lines of table header to make it look the same as the other HowTos.
I didn't know if it was an extension already enabled or something which I missed in the wiki docs. The extension I linked to looks reasonably simple to install/use although it doesn't look like it includes an Erlang mode. Should be simple to write one though.
I'm willing to help out however I can to get this working, for a language site this is quite an important feature  .
If you would like to write an extension that would be great.
What do you mean by "I can to get this work"? |
|
|
| Back to top |
|
| andreas |
Posted: Fri Jul 21, 2006 11:33 am |
|
|
|
User
Joined: 03 Jul 2006
Posts: 17
|
JuNC wrote:
Yep, thats right. Something which would highlight the syntax and possibly give the snippet a caption, maybe:
<code caption='Code snippet 1'>
blah() ->
ok.
</code>
I have made an extension for the code-tag to expand to the "fancy" and colorful table we all gone used to. :wink:
We we would change the way of the "code box", it's just a mater of changing the extension.
From now the perferd way to enter code, in the wiki, should be:
Code:
<code caption="Code snippet 1">
blah() ->
ok.
</code>
Any volenters up for the job of removin thos ugly html tables and replacing them by the code tag?
I'll look in to syntax high-lighting. |
|
|
| Back to top |
|
| JuNC |
Posted: Fri Jul 21, 2006 11:43 am |
|
|
|
Joined: 21 Jul 2006
Posts: 3
Location: Plymouth, England
|
Wow that was fast
Great job!
I volunteer to do at least some of the edits  |
|
|
| Back to top |
|
|
|