Jim Wilson wrote:
You could give the wrapper elements (<pre> and <div> tags) CSS classes to identify that it's source code and what language.
So
<source lang="php"> echo('hi there'); </source>
Might become
<pre class="sourcecode php"> .... </pre>
Then the pre-generated GeShi files could be modified to have all elements prefixed with .sourcecode .php or whatever.
That's what it does already, except for the bit about generating files.
It would probably make sense though to put all of this generated stuff into something other than Common.css but still loaded via a <link> tag which only appears on pages with at least one <source> block. Reason being that the CSS for all supported GeShi languages will probably be large, and unnecessary for the wide gamut of Wikipedia articles.
Yes it would be large, which is why I didn't make it that way.
-- Tim Starling