Codeblock extensions are mechanism that specialize certain codeblocks to different render behaviors.
+The extension will be trigger by the language argument to the codeblck
+
Embed reStructuredText
+
Recommonmark also allows embedding reStructuredText syntax in the codeblocks.
+There are two styles for embedding reStructuredText. The first is enabled by eval_rst codeblock. The content of codeblock will be parsed as reStructuredText and insert into the document. This can be used to quickly introduce some of reStructuredText command that not yet available in markdown. For example,
+
```eval_rst
+.. autoclass:: recommonmark.transform.AutoStructify
+ :show-inheritance:
+```
+
+
+
will be rendered as
+
+-
+class
recommonmark.transform.AutoStructify(document, startnode=None)
+基类:docutils.transforms.Transform
+Automatically try to transform blocks to sphinx directives.
+This class is designed to handle AST generated by CommonMarkParser.
+
+
+
This example used to use sphinx autodoc to insert document of AutoStructify class definition into the document.
+
The second style is a shorthand of the above style. It allows you to leave off the eval_rst .. portion and directly render directives. For example,
+
``` important:: Its a note! in markdown!
+```
+
+
+
will be rendered as
+
+
+
An Advanced Example
+
``` sidebar:: Line numbers and highlights
+
+ emphasis-lines:
+ highlights the lines.
+ linenos:
+ shows the line numbers as well.
+ caption:
+ shown at the top of the code block.
+ name:
+ may be referenced with `:ref:` later.
+```
+
+``` code-block:: markdown
+ :linenos:
+ :emphasize-lines: 3,5
+ :caption: An example code-block with everything turned on.
+ :name: Full code-block example
+
+ # Comment line
+ import System
+ System.run_emphasis_line
+ # Long lines in code blocks create a auto horizontal scrollbar
+ System.exit!
+```
+
+
+
will be rendered as
+
+
:linenos:
+ :emphasize-lines: 3,5
+ :caption: An example code-block with everything turned on.
+ :name: Full code-block example
+
+ # Comment line
+ import System
+ System.run_emphasis_line
+ # Long lines in code blocks create a auto horizontal scrollbar
+ System.exit!
+
+
+
The <div style="clear: right;"></div> line clears the sidebar for the next title.
+
+