Code Blocks
You're probably farmilliar with the basic code blocks most mark down applications provide. There are a few handy features available that can make your code snippets much easier to read.
Usage
Syntax Highlighting
Write the language shortcode after the opening ``` for code blocks:
Inline snippets
For inline code snippets use the syntax `#!py console.log("Hello, world")` where py is the language shortcode.
Titles
Add title="<custom title>" to the opening line after the language name replacing <custom title> with the actual title:
Line numbers
Line numbers can be added by using linenums="<start>" after the language name. The argument <start> is the number to start with on the first line.
Highlighted Lines
Add hl_lines="<lines>" after the language name to enable this feature. The <lines> argument can be a list of individual numbers seperated with spaces or a range seperated by a dash or both. The line numbers used are independent of the linenums argument.
Annotations
Annotations rely on comments from syntax highlighting and work similarly to text annotation. Place the annotation marker in a comment of the specified language then (optionally use a ! to hide the extra comment characters) add your content in an ordered list after the code block.