Welcome, guest | Sign In | My Account | Store | Cart

Recipe descriptions, discussions and comments on this site support Markdown syntax. Markdown is a simple way to markup text: bolding, links, lists, etc. -- the basic syntax is decribed below.

In addition to the basic Markdown syntax, ActiveState Code (this site) adds some personal flavor. See below for details.

Basic Markdown Syntax

[em, strong] *Italicize* and **bold** words with asterisks like this.

[a] Make a `[link](http://www.ruby-lang.org)` like this. When rendered it looks like this:

Make a link like this.

[img] Make an image link like this: ![Alt text](/static/img/cog.png) When rendered it looks like this:

Make an image link like this: Alt text

[code, pre] `Inline code spans` are delimited with backticks. A code block is created by indenting every line by at least 4 spaces, preceded by a blank line:

This is a normal paragraph.

    This is a preformatted
    code block.

[ul, ol, li] Lists are just like you would write them in text:

1. an ordered
2. list

* an unordered list
* '-' bullets work too

Full details on markdown syntax here.

ActiveState Code Extra Markdown Syntax

The following additions are made to the rendering of Markdown text for ActiveState Code (this site).

The use of leading and trailing _ and __ for emphasis and strong. These can easily get in the way when writing docs about source code with variable_like_this and when one is not careful about quoting.

Using text like Recipe 1234 will automatically link to that recipe.

Python interactive sections like the following are automatically converted to a <pre><code> block without needing to indent.

>>> print "Hello, World!"
Hello, World!

Primarily this was to support the importing old Python recipes, but hopefully will be useful for writing of Python recipes. Are there other languages' interactive shell sessions for which the same could be done?

This site uses the python-markdown2 implementation.