motivation:
I would like to create a template that (among other things) calls syntaxhighlight via parser function {{#tag}}.
unfortunately neither
{{#tag:syntaxhighlight|{{{code|{{{2}}}}}}|lang="{{{lang|{{{1|text}}}}}}"|start="{{{start|1}}}"|highlight="{{{highlight|}}}"|{{#if:{{{line|}}}|line=1}}
nor
{{#tag:syntaxhighlight|{{{code|{{{2}}}}}}|lang="{{{lang|{{{1|text}}}}}}"|start="{{{start|1}}}"|highlight="{{{highlight|}}}"{{#if:{{{line|}}}{{!}}line=1}}
works
With the litte patch suggest below, something like this is possible (works perfekt):
{{#tag:syntaxhighlight|{{{code|{{{2}}}}}}|lang="{{{lang|{{{1|text}}}}}}"|start="{{{start|1}}}"|highlight="{{{highlight|}}}"|line="{{{line|on}}}"}}
So my request:
Does anyone have a solution to the prolem. Otherwise, could you please consider the following alteration:
// Line numbers
if( isset( $args['line'] ) && $args['line'] != 'off' )
$geshi->enable_line_numbers( GESHI_FANCY_LINE_NUMBERS );
}
regards,
Tobias