httpd-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Gruno <>
Subject Re: Syntax Highlighting
Date Tue, 24 Apr 2012 14:22:50 GMT
On 24-04-2012 15:30, André Malo wrote:
>> 1) Modify common.dtd to allow classes inside <pre> tags
>> 2) Modify common.xsl to include the style sheet and scripts used for
>> highlighting the source code examples in our documentation.
>> To create syntax highlighted source code examples, the only requirement
>> would be that you use the following syntax:
>> <pre class="sh_c">
>> code_goes_here(foo);
>> </pre>
> I'd prefer a different element on xml side. Like <highlight language="perl"> 
> or <syntax>.
> Otherwise I like the javascript solution.
> nd
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:
The idea of a separate <highlight> tag sounds like a good idea.
I have uploaded some css/js files to the trunk for some testing, and I'm
sending two patches for common.dtd and common.xsl (in the style/ and
style/xsl directories) so people that wish can try out this solution and
give some feedback to the proposition.

The changes will allow for syntax highlighting of C, Perl, Python and
shell scripts using something similar to this:

<highlight language="perl">
    print($foo, $bar);

Any new languages we wish to add can be done so dynamically, as the
scripts are loaded according to which languages are put into the
<highlight> tags.

With regards,

View raw message