aboutsummaryrefslogtreecommitdiffstats
path: root/docs/extensions/header_id.txt
diff options
context:
space:
mode:
authorWaylan Limberg <waylan.limberg@icloud.com>2014-08-29 16:02:48 -0400
committerWaylan Limberg <waylan.limberg@icloud.com>2014-08-29 16:02:48 -0400
commite11a15531b5bd2d3ca2636e624ac377471b294e0 (patch)
tree0dda9df57d8843f765513072af2f7902f811734c /docs/extensions/header_id.txt
parent8aa89a389ae1a7cdafa516be84532b26ed3c565d (diff)
downloadmarkdown-e11a15531b5bd2d3ca2636e624ac377471b294e0.tar.gz
markdown-e11a15531b5bd2d3ca2636e624ac377471b294e0.tar.bz2
markdown-e11a15531b5bd2d3ca2636e624ac377471b294e0.zip
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.
Diffstat (limited to 'docs/extensions/header_id.txt')
-rw-r--r--docs/extensions/header_id.txt5
1 files changed, 3 insertions, 2 deletions
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
<h3 id="some_header">Some Header</h3>
<h4 id="next_level">Next Level</h4>'
@@ -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
<h1>Some Header</h1>
<h1 id="foo">Header with ID</h1>