Warning

This documentation is for an old version of IPython. You can find docs for newer versions here.

Module: nbconvert.filters.markdown

Markdown filters

This file contains a collection of utility filters for dealing with markdown within Jinja templates.

1 Class

class IPython.nbconvert.filters.markdown.NodeJSMissing

Bases: IPython.nbconvert.utils.exceptions.ConversionException

Exception raised when node.js is missing.

5 Functions

IPython.nbconvert.filters.markdown.markdown2html_mistune(source)

mistune is unavailable, raise ImportError

IPython.nbconvert.filters.markdown.markdown2latex(source, markup='markdown', extra_args=None)

Convert a markdown string to LaTeX via pandoc.

This function will raise an error if pandoc is not installed. Any error messages generated by pandoc are printed to stderr.

Parameters:

source : string

Input string, assumed to be valid markdown.

markup : string

Markup used by pandoc’s reader default : pandoc extended markdown (see http://johnmacfarlane.net/pandoc/README.html#pandocs-markdown)

Returns:

out : string

Output as returned by pandoc.

IPython.nbconvert.filters.markdown.markdown2html_pandoc(source, extra_args=None)

Convert a markdown string to HTML via pandoc

IPython.nbconvert.filters.markdown.markdown2html_marked(source, encoding='utf-8')

Convert a markdown string to HTML via marked

IPython.nbconvert.filters.markdown.markdown2rst(source, extra_args=None)

Convert a markdown string to ReST via pandoc.

This function will raise an error if pandoc is not installed. Any error messages generated by pandoc are printed to stderr.

Parameters:

source : string

Input string, assumed to be valid markdown.

Returns:

out : string

Output as returned by pandoc.