diff options
Diffstat (limited to 'markdown/extensions/headerid.py')
-rw-r--r-- | markdown/extensions/headerid.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/markdown/extensions/headerid.py b/markdown/extensions/headerid.py index 8221fe1..07351cc 100644 --- a/markdown/extensions/headerid.py +++ b/markdown/extensions/headerid.py @@ -9,7 +9,7 @@ Basic usage: >>> import markdown >>> text = "# Some Header #" >>> md = markdown.markdown(text, ['headerid']) - >>> print md + >>> print(md) <h1 id="some-header">Some Header</h1> All header IDs are unique: @@ -19,7 +19,7 @@ All header IDs are unique: ... #Header ... #Header''' >>> md = markdown.markdown(text, ['headerid']) - >>> print md + >>> print(md) <h1 id="header">Header</h1> <h1 id="header_1">Header</h1> <h1 id="header_2">Header</h1> @@ -30,7 +30,7 @@ To fit within a html template's hierarchy, set the header base level: ... #Some Header ... ## Next Level''' >>> md = markdown.markdown(text, ['headerid(level=3)']) - >>> print md + >>> print(md) <h3 id="some-header">Some Header</h3> <h4 id="next-level">Next Level</h4> @@ -38,7 +38,7 @@ Works with inline markup. >>> text = '#Some *Header* with [markup](http://example.com).' >>> md = markdown.markdown(text, ['headerid']) - >>> print md + >>> print(md) <h1 id="some-header-with-markup">Some <em>Header</em> with <a href="http://example.com">markup</a>.</h1> Turn off auto generated IDs: @@ -47,7 +47,7 @@ Turn off auto generated IDs: ... # Some Header ... # Another Header''' >>> md = markdown.markdown(text, ['headerid(forceid=False)']) - >>> print md + >>> print(md) <h1>Some Header</h1> <h1>Another Header</h1> @@ -58,7 +58,7 @@ Use with MetaData extension: ... ... # A Header''' >>> md = markdown.markdown(text, ['headerid', 'meta']) - >>> print md + >>> print(md) <h2>A Header</h2> Copyright 2007-2011 [Waylan Limberg](http://achinghead.com/). |