aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--markdown/extensions/abbr.py25
-rw-r--r--markdown/extensions/admonition.py35
-rw-r--r--markdown/extensions/attr_list.py11
-rw-r--r--markdown/extensions/codehilite.py13
-rw-r--r--markdown/extensions/def_list.py15
-rw-r--r--markdown/extensions/extra.py11
-rw-r--r--markdown/extensions/fenced_code.py88
-rw-r--r--markdown/extensions/footnotes.py32
-rw-r--r--markdown/extensions/headerid.py75
-rw-r--r--markdown/extensions/meta.py40
-rw-r--r--markdown/extensions/nl2br.py14
-rw-r--r--markdown/extensions/sane_lists.py15
-rw-r--r--markdown/extensions/smart_strong.py23
-rw-r--r--markdown/extensions/smarty.py146
-rw-r--r--markdown/extensions/tables.py13
-rw-r--r--markdown/extensions/toc.py12
-rw-r--r--markdown/extensions/wikilinks.py71
17 files changed, 193 insertions, 446 deletions
diff --git a/markdown/extensions/abbr.py b/markdown/extensions/abbr.py
index 7f2344a..58dd0aa 100644
--- a/markdown/extensions/abbr.py
+++ b/markdown/extensions/abbr.py
@@ -4,22 +4,15 @@ Abbreviation Extension for Python-Markdown
This extension adds abbreviation handling to Python-Markdown.
-Simple Usage:
-
- >>> import markdown
- >>> text = """
- ... Some text with an ABBR and a REF. Ignore REFERENCE and ref.
- ...
- ... *[ABBR]: Abbreviation
- ... *[REF]: Abbreviation Reference
- ... """
- >>> print(markdown.markdown(text, ['abbr']))
- <p>Some text with an <abbr title="Abbreviation">ABBR</abbr> and a <abbr title="Abbreviation Reference">REF</abbr>. Ignore REFERENCE and ref.</p>
-
-Copyright 2007-2008
-* [Waylan Limberg](http://achinghead.com/)
-* [Seemant Kulleen](http://www.kulleen.org/)
-
+See <https://pythonhosted.org/Markdown/extensions/abbreviations.html>
+for documentation.
+
+Oringinal code Copyright 2007-2008 [Waylan Limberg](http://achinghead.com/) and
+ [Seemant Kulleen](http://www.kulleen.org/)
+
+All changes Copyright 2008-2014 The Python Markdown Project
+
+License: [BSD](http://www.opensource.org/licenses/bsd-license.php)
'''
diff --git a/markdown/extensions/admonition.py b/markdown/extensions/admonition.py
index 7888d5e..189f2c2 100644
--- a/markdown/extensions/admonition.py
+++ b/markdown/extensions/admonition.py
@@ -4,39 +4,16 @@ Admonition extension for Python-Markdown
Adds rST-style admonitions. Inspired by [rST][] feature with the same name.
-The syntax is (followed by an indented block with the contents):
- !!! [type] [optional explicit title]
-
-Where `type` is used as a CSS class name of the div. If not present, `title`
-defaults to the capitalized `type`, so "note" -> "Note".
-
-rST suggests the following `types`, but you're free to use whatever you want:
- attention, caution, danger, error, hint, important, note, tip, warning
-
-
-A simple example:
- !!! note
- This is the first line inside the box.
-
-Outputs:
- <div class="admonition note">
- <p class="admonition-title">Note</p>
- <p>This is the first line inside the box</p>
- </div>
+[rST]: http://docutils.sourceforge.net/docs/ref/rst/directives.html#specific-admonitions
-You can also specify the title and CSS class of the admonition:
- !!! custom "Did you know?"
- Another line here.
+See <https://pythonhosted.org/Markdown/extensions/admonition.html>
+for documentation.
-Outputs:
- <div class="admonition custom">
- <p class="admonition-title">Did you know?</p>
- <p>Another line here.</p>
- </div>
+Original code Copyright [Tiago Serafim](http://www.tiagoserafim.com/).
-[rST]: http://docutils.sourceforge.net/docs/ref/rst/directives.html#specific-admonitions
+All changes Copyright The Python Markdown Project
-By [Tiago Serafim](http://www.tiagoserafim.com/).
+License: [BSD](http://www.opensource.org/licenses/bsd-license.php)
"""
diff --git a/markdown/extensions/attr_list.py b/markdown/extensions/attr_list.py
index 55b2f1f..59da3b4 100644
--- a/markdown/extensions/attr_list.py
+++ b/markdown/extensions/attr_list.py
@@ -6,15 +6,14 @@ Adds attribute list syntax. Inspired by
[maruku](http://maruku.rubyforge.org/proposal.html#attribute_lists)'s
feature of the same name.
-Copyright 2011 [Waylan Limberg](http://achinghead.com/).
+See <https://pythonhosted.org/Markdown/extensions/attr_list.html>
+for documentation.
-Contact: markdown@freewisdom.org
+Original code Copyright 2011 [Waylan Limberg](http://achinghead.com/).
-License: BSD (see ../LICENSE.md for details)
+All changes Copyright 2011-2014 The Python Markdown Project
-Dependencies:
-* [Python 2.4+](http://python.org)
-* [Markdown 2.1+](https://pythonhosted.org/Markdown/)
+License: [BSD](http://www.opensource.org/licenses/bsd-license.php)
"""
diff --git a/markdown/extensions/codehilite.py b/markdown/extensions/codehilite.py
index 6336cfc..7fbf83f 100644
--- a/markdown/extensions/codehilite.py
+++ b/markdown/extensions/codehilite.py
@@ -4,17 +4,14 @@ CodeHilite Extension for Python-Markdown
Adds code/syntax highlighting to standard Python-Markdown code blocks.
-Copyright 2006-2008 [Waylan Limberg](http://achinghead.com/).
+See <https://pythonhosted.org/Markdown/extensions/code_hilite.html>
+for documentation.
-Project website: <https://pythonhosted.org/Markdown/extensions/code_hilite.html>
-Contact: markdown@freewisdom.org
+Original code Copyright 2006-2008 [Waylan Limberg](http://achinghead.com/).
-License: BSD (see ../LICENSE.md for details)
+All changes Copyright 2008-2014 The Python Markdown Project
-Dependencies:
-* [Python 2.3+](http://python.org/)
-* [Markdown 2.0+](https://pythonhosted.org/Markdown/)
-* [Pygments](http://pygments.org/)
+License: [BSD](http://www.opensource.org/licenses/bsd-license.php)
"""
diff --git a/markdown/extensions/def_list.py b/markdown/extensions/def_list.py
index 3511651..22e2491 100644
--- a/markdown/extensions/def_list.py
+++ b/markdown/extensions/def_list.py
@@ -2,19 +2,16 @@
Definition List Extension for Python-Markdown
=============================================
-Added parsing of Definition Lists to Python-Markdown.
+Adds parsing of Definition Lists to Python-Markdown.
-A simple example:
+See <https://pythonhosted.org/Markdown/extensions/definition_lists.html>
+for documentation.
- Apple
- : Pomaceous fruit of plants of the genus Malus in
- the family Rosaceae.
- : An american computer company.
+Original code Copyright 2008 [Waylan Limberg](http://achinghead.com)
- Orange
- : The fruit of an evergreen tree of the genus Citrus.
+All changes Copyright 2008-2014 The Python Markdown Project
-Copyright 2008 - [Waylan Limberg](http://achinghead.com)
+License: [BSD](http://www.opensource.org/licenses/bsd-license.php)
"""
diff --git a/markdown/extensions/extra.py b/markdown/extensions/extra.py
index 6fba8db..c5526d1 100644
--- a/markdown/extensions/extra.py
+++ b/markdown/extensions/extra.py
@@ -11,10 +11,6 @@ convenience so that only one extension needs to be listed when
initiating Markdown. See the documentation for each individual
extension for specifics about that extension.
-In the event that one or more of the supported extensions are not
-available for import, Markdown will issue a warning and simply continue
-without that extension.
-
There may be additional extensions that are distributed with
Python-Markdown that are not included here in Extra. Those extensions
are not part of PHP Markdown Extra, and therefore, not part of
@@ -24,6 +20,13 @@ under a differant name. You could also edit the `extensions` global
variable defined below, but be aware that such changes may be lost
when you upgrade to any future version of Python-Markdown.
+See <https://pythonhosted.org/Markdown/extensions/extra.html>
+for documentation.
+
+Copyright The Python Markdown Project
+
+License: [BSD](http://www.opensource.org/licenses/bsd-license.php)
+
"""
from __future__ import absolute_import
diff --git a/markdown/extensions/fenced_code.py b/markdown/extensions/fenced_code.py
index 4403ccd..2aacca6 100644
--- a/markdown/extensions/fenced_code.py
+++ b/markdown/extensions/fenced_code.py
@@ -4,87 +4,15 @@ Fenced Code Extension for Python Markdown
This extension adds Fenced Code Blocks to Python-Markdown.
- >>> import markdown
- >>> text = '''
- ... A paragraph before a fenced code block:
- ...
- ... ~~~
- ... Fenced code block
- ... ~~~
- ... '''
- >>> html = markdown.markdown(text, extensions=['fenced_code'])
- >>> print(html)
- <p>A paragraph before a fenced code block:</p>
- <pre><code>Fenced code block
- </code></pre>
-
-Works with safe_mode also (we check this because we are using the HtmlStash):
-
- >>> print(markdown.markdown(text, extensions=['fenced_code'], safe_mode='replace'))
- <p>A paragraph before a fenced code block:</p>
- <pre><code>Fenced code block
- </code></pre>
-
-Include tilde's in a code block and wrap with blank lines:
-
- >>> text = '''
- ... ~~~~~~~~
- ...
- ... ~~~~
- ... ~~~~~~~~'''
- >>> print(markdown.markdown(text, extensions=['fenced_code']))
- <pre><code>
- ~~~~
- </code></pre>
-
-Language tags:
-
- >>> text = '''
- ... ~~~~{.python}
- ... # Some python code
- ... ~~~~'''
- >>> print(markdown.markdown(text, extensions=['fenced_code']))
- <pre><code class="python"># Some python code
- </code></pre>
-
-Optionally backticks instead of tildes as per how github's code block markdown is identified:
-
- >>> text = '''
- ... `````
- ... # Arbitrary code
- ... ~~~~~ # these tildes will not close the block
- ... `````'''
- >>> print(markdown.markdown(text, extensions=['fenced_code']))
- <pre><code># Arbitrary code
- ~~~~~ # these tildes will not close the block
- </code></pre>
-
-If the codehighlite extension and Pygments are installed, lines can be highlighted:
-
- >>> text = '''
- ... ```hl_lines="1 3"
- ... line 1
- ... line 2
- ... line 3
- ... ```'''
- >>> print(markdown.markdown(text, extensions=['codehilite', 'fenced_code']))
- <div class="codehilite"><pre><span class="hll"><span class="n">line</span> <span class="mi">1</span>
- </span><span class="n">line</span> <span class="mi">2</span>
- <span class="hll"><span class="n">line</span> <span class="mi">3</span>
- </span></pre></div>
-
-Copyright 2007-2008 [Waylan Limberg](http://achinghead.com/).
-
-Project website: <https://pythonhosted.org/Markdown/extensions/fenced_code_blocks.html>
-Contact: markdown@freewisdom.org
-
-License: BSD (see ../docs/LICENSE for details)
-
-Dependencies:
-* [Python 2.4+](http://python.org)
-* [Markdown 2.0+](https://pythonhosted.org/Markdown/)
-* [Pygments (optional)](http://pygments.org)
+See <https://pythonhosted.org/Markdown/extensions/fenced_code_blocks.html>
+for documentation.
+Original code Copyright 2007-2008 [Waylan Limberg](http://achinghead.com/).
+
+
+All changes Copyright 2008-2014 The Python Markdown Project
+
+License: [BSD](http://www.opensource.org/licenses/bsd-license.php)
"""
from __future__ import absolute_import
diff --git a/markdown/extensions/footnotes.py b/markdown/extensions/footnotes.py
index cec0d71..a59de97 100644
--- a/markdown/extensions/footnotes.py
+++ b/markdown/extensions/footnotes.py
@@ -1,25 +1,15 @@
"""
-========================= FOOTNOTES =================================
-
-This section adds footnote handling to markdown. It can be used as
-an example for extending python-markdown with relatively complex
-functionality. While in this case the extension is included inside
-the module itself, it could just as easily be added from outside the
-module. Not that all markdown classes above are ignorant about
-footnotes. All footnote functionality is provided separately and
-then added to the markdown instance at the run time.
-
-Footnote functionality is attached by calling extendMarkdown()
-method of FootnoteExtension. The method also registers the
-extension to allow it's state to be reset by a call to reset()
-method.
-
-Example:
- Footnotes[^1] have a label[^label] and a definition[^!DEF].
-
- [^1]: This is a footnote
- [^label]: A footnote on "label"
- [^!DEF]: The footnote for definition
+Footnotes Extension for Python-Markdown
+=======================================
+
+Adds footnote handling to Python-Markdown.
+
+See <https://pythonhosted.org/Markdown/extensions/footnotes.html>
+for documentation.
+
+Copyright The Python Markdown Project
+
+License: [BSD](http://www.opensource.org/licenses/bsd-license.php)
"""
diff --git a/markdown/extensions/headerid.py b/markdown/extensions/headerid.py
index f96f239..5ae84f3 100644
--- a/markdown/extensions/headerid.py
+++ b/markdown/extensions/headerid.py
@@ -4,73 +4,14 @@ HeaderID Extension for Python-Markdown
Auto-generate id attributes for HTML headers.
-Basic usage:
-
- >>> import markdown
- >>> text = "# Some Header #"
- >>> md = markdown.markdown(text, ['headerid'])
- >>> print(md)
- <h1 id="some-header">Some Header</h1>
-
-All header IDs are unique:
-
- >>> text = '''
- ... #Header
- ... #Header
- ... #Header'''
- >>> md = markdown.markdown(text, ['headerid'])
- >>> print(md)
- <h1 id="header">Header</h1>
- <h1 id="header_1">Header</h1>
- <h1 id="header_2">Header</h1>
-
-To fit within a html template's hierarchy, set the header base level:
-
- >>> text = '''
- ... #Some Header
- ... ## Next Level'''
- >>> md = markdown.markdown(text, ['headerid(level=3)'])
- >>> print(md)
- <h3 id="some-header">Some Header</h3>
- <h4 id="next-level">Next Level</h4>
-
-Works with inline markup.
-
- >>> text = '#Some *Header* with [markup](http://example.com).'
- >>> md = markdown.markdown(text, ['headerid'])
- >>> 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:
-
- >>> text = '''
- ... # Some Header
- ... # Another Header'''
- >>> md = markdown.markdown(text, ['headerid(forceid=False)'])
- >>> print(md)
- <h1>Some Header</h1>
- <h1>Another Header</h1>
-
-Use with MetaData extension:
-
- >>> text = '''header_level: 2
- ... header_forceid: Off
- ...
- ... # A Header'''
- >>> md = markdown.markdown(text, ['headerid', 'meta'])
- >>> print(md)
- <h2>A Header</h2>
-
-Copyright 2007-2011 [Waylan Limberg](http://achinghead.com/).
-
-Project website: <https://pythonhosted.org/Markdown/extensions/header_id.html>
-Contact: markdown@freewisdom.org
-
-License: BSD (see ../docs/LICENSE for details)
-
-Dependencies:
-* [Python 2.3+](http://python.org)
-* [Markdown 2.0+](https://pythonhosted.org/Markdown/)
+See <https://pythonhosted.org/Markdown/extensions/header_id.html>
+for documentation.
+
+Original code Copyright 2007-2011 [Waylan Limberg](http://achinghead.com/).
+
+All changes Copyright 2011-2014 The Python Markdown Project
+
+License: [BSD](http://www.opensource.org/licenses/bsd-license.php)
"""
diff --git a/markdown/extensions/meta.py b/markdown/extensions/meta.py
index 3d89946..bb81a86 100644
--- a/markdown/extensions/meta.py
+++ b/markdown/extensions/meta.py
@@ -4,38 +4,14 @@ Meta Data Extension for Python-Markdown
This extension adds Meta Data handling to markdown.
-Basic Usage:
-
- >>> import markdown
- >>> text = '''Title: A Test Doc.
- ... Author: Waylan Limberg
- ... John Doe
- ... Blank_Data:
- ...
- ... The body. This is paragraph one.
- ... '''
- >>> md = markdown.Markdown(['meta'])
- >>> print(md.convert(text))
- <p>The body. This is paragraph one.</p>
- >>> print(md.Meta) # doctest: +SKIP
- {'blank_data': [''], 'author': ['Waylan Limberg', 'John Doe'], 'title': ['A Test Doc.']}
-
-Make sure text without Meta Data still works (markdown < 1.6b returns a <p>).
-
- >>> text = ' Some Code - not extra lines of meta data.'
- >>> md = markdown.Markdown(['meta'])
- >>> print(md.convert(text))
- <pre><code>Some Code - not extra lines of meta data.
- </code></pre>
- >>> md.Meta
- {}
-
-Copyright 2007-2008 [Waylan Limberg](http://achinghead.com).
-
-Project website: <https://pythonhosted.org/Markdown/extensions/meta_data.html>
-Contact: markdown@freewisdom.org
-
-License: BSD (see ../LICENSE.md for details)
+See <https://pythonhosted.org/Markdown/extensions/meta_data.html>
+for documentation.
+
+Original code Copyright 2007-2008 [Waylan Limberg](http://achinghead.com).
+
+All changes Copyright 2008-2014 The Python Markdown Project
+
+License: [BSD](http://www.opensource.org/licenses/bsd-license.php)
"""
diff --git a/markdown/extensions/nl2br.py b/markdown/extensions/nl2br.py
index eab4084..062a7e6 100644
--- a/markdown/extensions/nl2br.py
+++ b/markdown/extensions/nl2br.py
@@ -5,18 +5,14 @@ NL2BR Extension
A Python-Markdown extension to treat newlines as hard breaks; like
GitHub-flavored Markdown does.
-Usage:
+See <https://pythonhosted.org/Markdown/extensions/nl2br.html>
+for documentation.
- >>> import markdown
- >>> print(markdown.markdown('line 1\\nline 2', extensions=['nl2br']))
- <p>line 1<br />
- line 2</p>
+Oringinal code Copyright 2011 [Brian Neal](http://deathofagremmie.com/)
-Copyright 2011 [Brian Neal](http://deathofagremmie.com/)
+All changes Copyright 2011-2014 The Python Markdown Project
-Dependencies:
-* [Python 2.4+](http://python.org)
-* [Markdown 2.1+](https://pythonhosted.org/Markdown/)
+License: [BSD](http://www.opensource.org/licenses/bsd-license.php)
"""
diff --git a/markdown/extensions/sane_lists.py b/markdown/extensions/sane_lists.py
index 22a4ff3..9eb3a11 100644
--- a/markdown/extensions/sane_lists.py
+++ b/markdown/extensions/sane_lists.py
@@ -2,19 +2,16 @@
Sane List Extension for Python-Markdown
=======================================
-Modify the behavior of Lists in Python-Markdown t act in a sane manor.
+Modify the behavior of Lists in Python-Markdown to act in a sane manor.
-In standard Markdown syntax, the following would constitute a single
-ordered list. However, with this extension, the output would include
-two lists, the first an ordered list and the second and unordered list.
+See <https://pythonhosted.org/Markdown/extensions/sane_lists.html>
+for documentation.
- 1. ordered
- 2. list
+Original code Copyright 2011 [Waylan Limberg](http://achinghead.com)
- * unordered
- * list
+All changes Copyright 2011-2014 The Python Markdown Project
-Copyright 2011 - [Waylan Limberg](http://achinghead.com)
+License: [BSD](http://www.opensource.org/licenses/bsd-license.php)
"""
diff --git a/markdown/extensions/smart_strong.py b/markdown/extensions/smart_strong.py
index 877b5a7..331dae8 100644
--- a/markdown/extensions/smart_strong.py
+++ b/markdown/extensions/smart_strong.py
@@ -4,21 +4,14 @@ Smart_Strong Extension for Python-Markdown
This extention adds smarter handling of double underscores within words.
-Simple Usage:
-
- >>> import markdown
- >>> print(markdown.markdown('Text with double__underscore__words.',
- ... extensions=['smart_strong']))
- <p>Text with double__underscore__words.</p>
- >>> print(markdown.markdown('__Strong__ still works.',
- ... extensions=['smart_strong']))
- <p><strong>Strong</strong> still works.</p>
- >>> print(markdown.markdown('__this__works__too__.',
- ... extensions=['smart_strong']))
- <p><strong>this__works__too</strong>.</p>
-
-Copyright 2011
-[Waylan Limberg](http://achinghead.com)
+See <https://pythonhosted.org/Markdown/extensions/smart_strong.html>
+for documentation.
+
+Original code Copyright 2011 [Waylan Limberg](http://achinghead.com)
+
+All changes Copyright 2011-2014 The Python Markdown Project
+
+License: [BSD](http://www.opensource.org/licenses/bsd-license.php)
'''
diff --git a/markdown/extensions/smarty.py b/markdown/extensions/smarty.py
index d5ac62c..00c330f 100644
--- a/markdown/extensions/smarty.py
+++ b/markdown/extensions/smarty.py
@@ -1,69 +1,85 @@
# -*- coding: utf-8 -*-
-# Smarty extension for Python-Markdown
-# Author: 2013, Dmitry Shachnev <mitya57@gmail.com>
-
-# SmartyPants license:
-#
-# Copyright (c) 2003 John Gruber <http://daringfireball.net/>
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# * Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-#
-# * Neither the name "SmartyPants" nor the names of its contributors
-# may be used to endorse or promote products derived from this
-# software without specific prior written permission.
-#
-# This software is provided by the copyright holders and contributors "as
-# is" and any express or implied warranties, including, but not limited
-# to, the implied warranties of merchantability and fitness for a
-# particular purpose are disclaimed. In no event shall the copyright
-# owner or contributors be liable for any direct, indirect, incidental,
-# special, exemplary, or consequential damages (including, but not
-# limited to, procurement of substitute goods or services; loss of use,
-# data, or profits; or business interruption) however caused and on any
-# theory of liability, whether in contract, strict liability, or tort
-# (including negligence or otherwise) arising in any way out of the use
-# of this software, even if advised of the possibility of such damage.
-#
-#
-# smartypants.py license:
-#
-# smartypants.py is a derivative work of SmartyPants.
-# Copyright (c) 2004, 2007 Chad Miller <http://web.chad.org/>
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# * Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-#
-# This software is provided by the copyright holders and contributors "as
-# is" and any express or implied warranties, including, but not limited
-# to, the implied warranties of merchantability and fitness for a
-# particular purpose are disclaimed. In no event shall the copyright
-# owner or contributors be liable for any direct, indirect, incidental,
-# special, exemplary, or consequential damages (including, but not
-# limited to, procurement of substitute goods or services; loss of use,
-# data, or profits; or business interruption) however caused and on any
-# theory of liability, whether in contract, strict liability, or tort
-# (including negligence or otherwise) arising in any way out of the use
-# of this software, even if advised of the possibility of such damage.
+'''
+Smarty extension for Python-Markdown
+====================================
+
+Adds conversion of ASCII dashes, quotes and ellipses to their HTML
+entity equivalents.
+
+See <https://pythonhosted.org/Markdown/extensions/smarty.html>
+for documentation.
+
+Author: 2013, Dmitry Shachnev <mitya57@gmail.com>
+
+All changes Copyright 2013-2014 The Python Markdown Project
+
+License: [BSD](http://www.opensource.org/licenses/bsd-license.php)
+
+SmartyPants license:
+
+ Copyright (c) 2003 John Gruber <http://daringfireball.net/>
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ * Neither the name "SmartyPants" nor the names of its contributors
+ may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ This software is provided by the copyright holders and contributors "as
+ is" and any express or implied warranties, including, but not limited
+ to, the implied warranties of merchantability and fitness for a
+ particular purpose are disclaimed. In no event shall the copyright
+ owner or contributors be liable for any direct, indirect, incidental,
+ special, exemplary, or consequential damages (including, but not
+ limited to, procurement of substitute goods or services; loss of use,
+ data, or profits; or business interruption) however caused and on any
+ theory of liability, whether in contract, strict liability, or tort
+ (including negligence or otherwise) arising in any way out of the use
+ of this software, even if advised of the possibility of such damage.
+
+
+smartypants.py license:
+
+ smartypants.py is a derivative work of SmartyPants.
+ Copyright (c) 2004, 2007 Chad Miller <http://web.chad.org/>
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+
+ This software is provided by the copyright holders and contributors "as
+ is" and any express or implied warranties, including, but not limited
+ to, the implied warranties of merchantability and fitness for a
+ particular purpose are disclaimed. In no event shall the copyright
+ owner or contributors be liable for any direct, indirect, incidental,
+ special, exemplary, or consequential damages (including, but not
+ limited to, procurement of substitute goods or services; loss of use,
+ data, or profits; or business interruption) however caused and on any
+ theory of liability, whether in contract, strict liability, or tort
+ (including negligence or otherwise) arising in any way out of the use
+ of this software, even if advised of the possibility of such damage.
+
+'''
+
from __future__ import unicode_literals
from . import Extension
diff --git a/markdown/extensions/tables.py b/markdown/extensions/tables.py
index 2977bd1..57507e9 100644
--- a/markdown/extensions/tables.py
+++ b/markdown/extensions/tables.py
@@ -4,14 +4,15 @@ Tables Extension for Python-Markdown
Added parsing of tables to Python-Markdown.
-A simple example:
+See <https://pythonhosted.org/Markdown/extensions/tables.html>
+for documentation.
- First Header | Second Header
- ------------- | -------------
- Content Cell | Content Cell
- Content Cell | Content Cell
+Original code Copyright 2009 [Waylan Limberg](http://achinghead.com)
+
+All changes Copyright 2008-2014 The Python Markdown Project
+
+License: [BSD](http://www.opensource.org/licenses/bsd-license.php)
-Copyright 2009 - [Waylan Limberg](http://achinghead.com)
"""
from __future__ import absolute_import
diff --git a/markdown/extensions/toc.py b/markdown/extensions/toc.py
index 8ab8c03..22cf063 100644
--- a/markdown/extensions/toc.py
+++ b/markdown/extensions/toc.py
@@ -1,11 +1,15 @@
"""
Table of Contents Extension for Python-Markdown
-* * *
+===============================================
-(c) 2008 [Jack Miller](http://codezen.org)
+See <https://pythonhosted.org/Markdown/extensions/toc.html>
+for documentation.
-Dependencies:
-* [Markdown 2.1+](https://pythonhosted.org/Markdown/)
+Oringinal code Copyright 2008 [Jack Miller](http://codezen.org)
+
+All changes Copyright 2008-2014 The Python Markdown Project
+
+License: [BSD](http://www.opensource.org/licenses/bsd-license.php)
"""
diff --git a/markdown/extensions/wikilinks.py b/markdown/extensions/wikilinks.py
index cb20906..64377cf 100644
--- a/markdown/extensions/wikilinks.py
+++ b/markdown/extensions/wikilinks.py
@@ -2,78 +2,17 @@
WikiLinks Extension for Python-Markdown
======================================
-Converts [[WikiLinks]] to relative links. Requires Python-Markdown 2.0+
+Converts [[WikiLinks]] to relative links.
-Basic usage:
+See <https://pythonhosted.org/Markdown/extensions/wikilinks.html>
+for documentation.
- >>> import markdown
- >>> text = "Some text with a [[WikiLink]]."
- >>> html = markdown.markdown(text, ['wikilinks'])
- >>> print(html)
- <p>Some text with a <a class="wikilink" href="/WikiLink/">WikiLink</a>.</p>
+Original code Copyright [Waylan Limberg](http://achinghead.com/).
-Whitespace behavior:
-
- >>> print(markdown.markdown('[[ foo bar_baz ]]', ['wikilinks']))
- <p><a class="wikilink" href="/foo_bar_baz/">foo bar_baz</a></p>
- >>> print(markdown.markdown('foo [[ ]] bar', ['wikilinks']))
- <p>foo bar</p>
-
-To define custom settings the simple way:
-
- >>> print(markdown.markdown(text,
- ... ['wikilinks(base_url=/wiki/,end_url=.html,html_class=foo)']
- ... ))
- <p>Some text with a <a class="foo" href="/wiki/WikiLink.html">WikiLink</a>.</p>
-
-Custom settings the complex way:
-
- >>> md = markdown.Markdown(
- ... extensions = ['wikilinks'],
- ... extension_configs = {'wikilinks': [
- ... ('base_url', 'http://example.com/'),
- ... ('end_url', '.html'),
- ... ('html_class', '') ]},
- ... safe_mode = True)
- >>> print(md.convert(text))
- <p>Some text with a <a href="http://example.com/WikiLink.html">WikiLink</a>.</p>
-
-Use MetaData with mdx_meta.py (Note the blank html_class in MetaData):
-
- >>> text = """wiki_base_url: http://example.com/
- ... wiki_end_url: .html
- ... wiki_html_class:
- ...
- ... Some text with a [[WikiLink]]."""
- >>> md = markdown.Markdown(extensions=['meta', 'wikilinks'])
- >>> print(md.convert(text))
- <p>Some text with a <a href="http://example.com/WikiLink.html">WikiLink</a>.</p>
-
-MetaData should not carry over to next document:
-
- >>> print(md.convert("No [[MetaData]] here."))
- <p>No <a class="wikilink" href="/MetaData/">MetaData</a> here.</p>
-
-Define a custom URL builder:
-
- >>> def my_url_builder(label, base, end):
- ... return '/bar/'
- >>> md = markdown.Markdown(extensions=['wikilinks'],
- ... extension_configs={'wikilinks' : [('build_url', my_url_builder)]})
- >>> print(md.convert('[[foo]]'))
- <p><a class="wikilink" href="/bar/">foo</a></p>
-
-From the command line:
-
- python markdown.py -x wikilinks(base_url=http://example.com/,end_url=.html,html_class=foo) src.txt
-
-By [Waylan Limberg](http://achinghead.com/).
+All changes Copyright The Python Markdown Project
License: [BSD](http://www.opensource.org/licenses/bsd-license.php)
-Dependencies:
-* [Python 2.3+](http://python.org)
-* [Markdown 2.0+](https://pythonhosted.org/Markdown/)
'''
from __future__ import absolute_import