Template talk:source

Font looks different for C++ code
C source and C++ source look quite different on my machine

Firebug reveals the following rule for C++:

--Bazzy 09:02, 27 April 2012 (PDT)


 * Thanks for reporting this bug. I forgot to update the CSS when the C language was added. Since I use the DejaVu as default font, I couldn't see the difference. Hope this is now fixed. -- P12 13:29, 27 April 2012 (PDT)

Autolinking of library names
Hi, I'm trying to understand how the autolinking of library names works (e.g. in ) with a view to adding missing names (e.g. the new ). I've worked out that Template:source calls the magic word #tag:source ([]), which then presumably invokes the &lt;source&gt; tag, which I'm guessing is the old Extension:SyntaxHighlight_GeSHi. Is there any way I can contribute to the list of recognised library names or should I just make requests? ed@catmur.co.uk (talk) 04:02, 6 September 2016 (PDT)
 * The list is MediaWiki:Geshi-keyword-list-cpp, which is generated from https://github.com/p12tic/cppreference-doc/blob/master/index-functions-cpp.xml --D41D8CD98F (talk) 05:54, 6 September 2016 (PDT)

Protected edit request: Parameter for leading spaces
Unfortunately, MediaWiki eats leading and trailing spaces on = parameters to templates and there's no real way around that. Meaning that this:

 looks very different from this:

 As I said, there's no way around it, and since most code passed to will contain equals signs, the second form is necessarily more common.

However, it is possible to add an optional parameter  to this template, that will insert the requisite number of spaces. In order to support this parameter, and make it possible to use the template like this:

 Please change the template code from this: to this: Thanks.

(P.S> Just FYI, I'll be making a similar request at Template talk:example, to add  and   arguments that it passes to Template:source.)  -- FeRDNYC (talk) 18:18, 3 July 2021 (PDT)