fenced code blocks

Stonesjtu edited this page Apr 7, 2017 · 7 revisions

fenced-code-blocks extra

It allows a code block to not have to be indented by fencing it with ``` on a line before and after. Based on GFM.

Some code:

```
print "hi"
```
print "hi"

It includes support for code syntax highlighting as per GFM. You must have the pygments Python module installed for this to work.

```python
if True:
    print "hi"
```
if True:
    print "hi"

This obsoletes the code-color extra.

To really show colors you need to add one of pygment css files, see https://github.com/richleland/pygments-css. Instead of directly using the css files, it's necessary to regenerate css files with the div class being codehilite. Simply change the .highlight into .codehilite in the Makefile and make cssfiles.

(Return to Extras page.)

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.