Template talk:Lua
Great!
Nice thing you did there. Sad how it's not supported on IE and webkit (Safari and Google Chrome), but they'll eventually be supported, anyways.
- If we use this everywhere, it also makes transitions between syntax highlighters easier.
Unusual and Strange?
How is an indentation of 3 strange? It's what I use everywhere for Lua, it's between 2 and 4, which are often used, and it's what the studio uses by default anyways...
- I guess it just feels wrong to me. Pretty much all the code I see is indented by 4 spaces / a 4-space tab. I guess you can change it back to 3 if you really want. I don't think "it matches studio" is a valid excuse, since at present, the colors don't match anyway.
Problem with leading and trailing whitespace
There's a problem with hiding the code tag in a template like this - the parameters to {{#tag}} get trimmed, so we lose leading and trailing whitespace in code. Not normally an issue, but I can forsee corner cases.
Preferred Method of Syntax Highlighting?
I've been trying to begin contributing to the wiki again, but I've seen many different ways of attempting syntax highlighting.
Which one is best? {{lua}}, {{code}}, <syntaxhighlight lang="lua">, <pre>, etc
Have we come to a conclusion as to which to use? If so I can begin updating articles to use the preferred method. NecroBumpist 17:00, 14 April 2012 (EDT)
- Ideally, we want the <syntaxhighlight> tag, but we don't have the right extension installed. I'd at least hold off on updating anything until we get that resolved. --Anaminus 19:23, 14 April 2012 (EDT)
- Use {{code}} or {{lua}}. <code lua> is fine too. However, you shouldn't use <pre>. --JulienDethurens 16:15, 15 April 2012 (EDT)
- <code lua> is not fine. We can fix templates sidewide. Using the raw tag would result in a mess after an update.
- Speaking of fixing templates... Any chance of getting proper syntax highlighting of number literals?
0x1234, 10e6
- Speaking of fixing templates... Any chance of getting proper syntax highlighting of number literals?
- <code lua> is not fine. We can fix templates sidewide. Using the raw tag would result in a mess after an update.
- Use {{code}} or {{lua}}. <code lua> is fine too. However, you shouldn't use <pre>. --JulienDethurens 16:15, 15 April 2012 (EDT)
- But using the template doesn't properly escape wiki text. i.e. {{lua|={{Example}}}} Translates to: --Anaminus 17:46, 15 April 2012 (EDT)
<div class="box shrink" style="background-color: #F5FAFF; border-color: #2F6EAC;"><div class="title" style="border-color: #2F6EAC; background-color: #CEE0F2; font-size: larger;">Example</div>{{{1}}}</div>
- But using the template doesn't properly escape wiki text. i.e. {{lua|={{Example}}}} Translates to: