Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > core-release > by-pkgid > 475047415fcf83c129d0834cea9418c4 > files > 145

python3-markdown-2.4.1-4.mga5.noarch.rpm

<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8>
<title>Python Markdown</title>
<link rel="stylesheet" href="default.css" type="text/css">
</head>
<body>

<div class="related">
  <h3>Navigation</h3>
  <ul>
    <li class="right" style="margin-right: 10px">
      <a href="siteindex.html" title="General Index">index</a></li>
    <li class="right">
      <a href="install.html" title="Installation"
         accesskey="N">next</a> |</li>
    <li class="right">
      <a href="siteindex.html" title="Table of Contents"
         accesskey="P">previous</a> |</li>
    <li><img src="py.png" alt=""
             style="vertical-align: middle; margin-top: -1px"/></li>
    <li><a href="index.html">Python Markdown v2.4.1 documentation</a> &raquo;</li>
    
  </ul>
</div> <!-- .related -->

<div class="document">
  <div class="documentwrapper">
    <div class="bodywrapper">
      <div class="body">
<h1 id="python-markdown">Python-Markdown<a class="headerlink" href="#python-markdown" title="Permanent link">&para;</a></h1>
<p>This is a Python implementation of John Gruber&rsquo;s 
<a href="http://daringfireball.net/projects/markdown/">Markdown</a>. 
It is almost completely compliant with the reference implementation,
though there are a few very minor <a href="#differences">differences</a>. See John&rsquo;s 
<a href="http://daringfireball.net/projects/markdown/syntax">Syntax Documentation</a> 
for the syntax rules.</p>
<p>See the <a href="install.html">installation instructions</a> to get started.</p>
<h2 id="goals">Goals<a class="headerlink" href="#goals" title="Permanent link">&para;</a></h2>
<p>The Python-Markdown project is developed with the following goals in mind:</p>
<ul>
<li>
<p>Maintain a Python 2 <em>and</em> Python 3 library (with an optional CLI wrapper)
  suited to use in web server environments (never raise an exception, never 
  write to stdout, etc.) as an implementation of the markdown parser that 
  follows the <a href="http://daringfireball.net/projects/markdown/syntax">syntax rules</a>
  and the behavior of the original (markdown.pl) implementation as reasonably
  as possible (see <a href="#differences">differences</a> for a few exceptions).</p>
</li>
<li>
<p>Provide an <a href="extensions/api.html">Extension API</a> which makes it possible
  to change and/or extend the behavior of the parser.</p>
</li>
</ul>
<h2 id="features">Features<a class="headerlink" href="#features" title="Permanent link">&para;</a></h2>
<p>In addition to the basic markdown syntax, Python-Markdown supports the following
features:</p>
<ul>
<li>
<p><strong>International Input</strong></p>
<p>Python-Markdown will accept <a href="reference.html#text">input</a> in any language 
supported by Unicode including bi-directional text. In fact the test suite 
includes documents written in Russian and Arabic.</p>
</li>
<li>
<p><strong>Extensions</strong></p>
<p>Various <a href="extensions/index.html">extensions</a> are provided (including 
<a href="extensions/extra.html">extra</a>) to change and/or extend the base syntax. 
Additionally, a public <a href="extensions/api.html">Extension API</a> is available 
to write your own extensions.</p>
</li>
<li>
<p><strong>Output Formats</strong></p>
<p>Python-Markdown can output documents in HTML4, XHTML and HTML5. See the
<a href="reference.html#output_format">Library Reference</a> for details.</p>
</li>
<li>
<p><strong>&rdquo;Safe Mode&rdquo;</strong></p>
<p>When using Python-Markdown to parse input from untrusted users on the web,
the handling of raw HTML can be controlled in various ways to prevent 
harmful code from being injected into your site. See the
<a href="reference.html#safe_mode">Library Reference</a> for details.</p>
</li>
<li>
<p><strong>Command Line Interface</strong></p>
<p>In addition to being a Python Library, a 
<a href="cli.html">command line script</a> is available for your convenience.</p>
</li>
</ul>
<h2 id="differences">Differences<a class="headerlink" href="#differences" title="Permanent link">&para;</a></h2>
<p>While Python-Markdown strives to fully implement markdown as described in the 
<a href="http://daringfireball.net/projects/markdown/syntax">syntax rules</a>, the rules 
can be interpreted in different ways and different implementations 
occasionally vary in their behavior (see the 
<a href="http://johnmacfarlane.net/babelmark2/faq.html#what-are-some-examples-of-interesting-divergences-between-implementations">Babelmark FAQ</a>
for some examples). Known and intentional differences found in Python-Markdown 
are summarized below:</p>
<ul>
<li>
<p><strong>Middle-Word Emphasis</strong></p>
<p>Python-Markdown defaults to ignoring middle-word emphasis. In other words,
<code>some_long_filename.txt</code> will not become <code>some&lt;em&gt;long&lt;/em&gt;filename.txt</code>.
This can be switched off if desired. See the 
<a href="reference.html#smart_emphasis">Library Reference</a> for details.</p>
</li>
<li>
<p><strong>Indentation/Tab Length</strong></p>
<p>The <a href="http://daringfireball.net/projects/markdown/syntax#list">syntax rules</a> 
clearly state that when a list item consists of multiple paragraphs, &ldquo;each 
subsequent paragraph in a list item <strong>must</strong> be indented by either 4 spaces 
or one tab&rdquo; (emphasis added). However, many implementations do not enforce 
this rule and allow less than 4 spaces of indentation. The implementers of 
Python-Markdown consider it a bug to not enforce this rule. </p>
<p>This applies to any block level elements nested in a list, including
paragraphs, sub-lists, blockquotes, code blocks, etc. They <strong>must</strong> always 
be indented by at least four spaces (or one tab) for each level of nesting.</p>
<p>In the event that one would prefer different behavior,
<a href="reference.html#tab_length">tab_length</a> can be set to whatever length is 
desired. Be warned however, as this will affect indentation for all aspects 
of the syntax (including root level code blocks).</p>
</li>
<li>
<p><strong>Consecutive Lists</strong></p>
<p>While the syntax rules are not clear on this, many implementations (including 
the original) do not end one list and start a second list when the list marker
(asterisks, pluses, hyphens, and numbers) changes. For consistency, 
Python-Markdown maintains the same behavior with no plans to change in the 
foreseeable future. That said, the <a href="extensions/sane_lists.html">Sane List Extension</a>
is available to provide a less surprising behavior.</p>
</li>
</ul>
<h2 id="support">Support<a class="headerlink" href="#support" title="Permanent link">&para;</a></h2>
<p>You may ask for help and discuss various other issues on the <a href="http://lists.sourceforge.net/lists/listinfo/python-markdown-discuss">mailing list</a> 
and report bugs on the <a href="http://github.com/waylan/Python-Markdown/issues">bug tracker</a>.</p>
      </div> <!-- .body -->
    </div> <!-- .bodywrapper -->
  </div> <!-- .documentwrapper -->

  <div class="sphinxsidebar">
    <div class="sphinxsidebarwrapper">
    <h3>Table Of Contents</h3>
    <div class="toc">
<ul>
<li><a href="#python-markdown">Python-Markdown</a><ul>
<li><a href="#goals">Goals</a></li>
<li><a href="#features">Features</a></li>
<li><a href="#differences">Differences</a></li>
<li><a href="#support">Support</a></li>
</ul>
</li>
</ul>
</div>


    <h4>Previous topic</h4>
      <p class="topless"><a href="siteindex.html"
         title="previous chapter">Table of Contents</a></p>
    <h4>Next topic</h4>
      <p class="topless"><a href="install.html"
         title="next chapter">Installation</a></p>
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="https://github.com/waylan/Python-Markdown/issues"
             >Report a Bug</a></li>
      <li><a href="index.txt"
             rel="nofollow">Show Source</a></li>
    </ul>
    </div> <!-- .sphinxsidebarwrapper -->
  </div> <!-- .sphinxsidebar -->

  <div class="clearer"></div>
</div> <!-- .document -->

<div class="related">
  <h3>Navigation</h3>
  <ul>
    <li class="right" style="margin-right: 10px">
      <a href="siteindex.html" title="General Index">index</a></li>
    <li class="right">
      <a href="install.html" title="Installation"
         accesskey="N">next</a> |</li>
    <li class="right">
      <a href="siteindex.html" title="Table of Contents"
         accesskey="P">previous</a> |</li>
    <li><img src="py.png" alt=""
             style="vertical-align: middle; margin-top: -1px"/></li>
    <li><a href="index.html">Python Markdown v2.4.1 documentation</a> &raquo;</li>
    
  </ul>
</div> <!-- .related -->

<div class="footer">&copy; 2010-2012 Python Markdown Project</div>
</body>
</html>