From e11a15531b5bd2d3ca2636e624ac377471b294e0 Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Fri, 29 Aug 2014 16:02:48 -0400 Subject: Code exampeles in extension docs now show best practices. This is in anticipation of #335. The reference and extension api docs still need to be updated, but that will happen with change in the code. --- docs/extensions/header_id.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'docs/extensions/header_id.txt') diff --git a/docs/extensions/header_id.txt b/docs/extensions/header_id.txt index 71d65f4..2881c50 100644 --- a/docs/extensions/header_id.txt +++ b/docs/extensions/header_id.txt @@ -55,7 +55,8 @@ The following options are provided to configure the output: >>> text = ''' ... #Some Header ... ## Next Level''' - >>> html = markdown.markdown(text, extensions=['headerid(level=3)']) + >>> from markdown.extensions.headerid import HeaderIdExtension + >>> html = markdown.markdown(text, extensions=[HeaderIdExtension(level=3)]) >>> print html

Some Header

Next Level

' @@ -72,7 +73,7 @@ The following options are provided to configure the output: ... # Some Header ... # Header with ID # { #foo }''' >>> html = markdown.markdown(text, - extensions=['attr_list', 'headerid(forceid=False)']) + extensions=['attr_list', HeaderIdExtension(forceid=False)]) >>> print html

Some Header

Header with ID

-- cgit v1.2.3