support for {code|first-line=xxx}

Issue #21 resolved
Hector Palacios created an issue

This would be simple: an argument to select the starting line number. This would help to insert an excerpt of code and help others locate the piece of code in a large file, by looking at the line number.

Comments (6)

  1. Luke Chavers

    I know, what a simple thing it would have been.. to just add it... but, whatever.. here's a workaround:

    {code:php|highlight=[11,12] first-line: 10}
    echo "line1";
    echo "line2";
    echo "line3";
    echo "line4";
    {code}
    

    Note that I appended (injected) the first-line parameter to the end of the highlight param's value so that it gets placed directly into the <PRE> 'class', which the JS utility from Alex Gorbatchev uses for configuration.

  2. Log in to comment