Template:CodeCommentary/doc

Usage
Use the template to display blocks of code with syntax highlighting interspersed with blocks of commentary.

Additionally, you can add an icon next to a specific line of the code block, of an eye (indicating "look here!") or of a pointing hand (this may take a link; since we cannot directly add a link a class name in a code block, this is the next best thing.

To add a commentary block, do the following:

To add a code block with no icon, do the following (using the language of your choice from this list:

To add a code block with an eyes icon at line 3 in the block (counting from 1 always), do:

To add a code bloc with a hand icon at line 3 in the block and a link, do:

You may also change the line numbering to start with a different number, if you are spltting up a longer piece of code into blocks for commentary, as intended with this template. TO start a code block with line 5, do:

Examples
Do:

to get