Current File : //usr/share/doc/python2-markdown-2.4.1/extensions/smarty.html
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8>
<title>SmartyPants Extension &#8212; 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="toc.html" title="Table of Contents Extension"
         accesskey="N">next</a> |</li>
    <li class="right">
      <a href="sane_lists.html" title="Sane Lists Extension"
         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>
    <li><a href="index.html">Extensions</a> &raquo;</li>
<li><a href="smarty.html">SmartyPants Extension</a> &raquo;</li>
  </ul>
</div> <!-- .related -->

<div class="document">
  <div class="documentwrapper">
    <div class="bodywrapper">
      <div class="body">
<h1 id="smartypants">SmartyPants<a class="headerlink" href="#smartypants" title="Permanent link">&para;</a></h1>
<h2 id="summary">Summary<a class="headerlink" href="#summary" title="Permanent link">&para;</a></h2>
<p>The SmartyPants extension converts ASCII dashes, quotes and ellipses to
their HTML entity equivalents.</p>
<table>
<thead>
<tr>
<th>ASCII symbol</th>
<th>Replacements</th>
<th>HTML Entities</th>
</tr>
</thead>
<tbody>
<tr>
<td>&#39;</td>
<td>&lsquo; &rsquo;</td>
<td><code>&amp;lsquo;</code> <code>&amp;rsquo;</code></td>
</tr>
<tr>
<td>&quot;</td>
<td>&ldquo; &rdquo;</td>
<td><code>&amp;ldquo;</code> <code>&amp;rdquo;</code></td>
</tr>
<tr>
<td>...</td>
<td>&hellip;</td>
<td><code>&amp;hellip;</code></td>
</tr>
<tr>
<td>--</td>
<td>&ndash;</td>
<td><code>&amp;ndash;</code></td>
</tr>
<tr>
<td>---</td>
<td>&mdash;</td>
<td><code>&amp;mdash;</code></td>
</tr>
</tbody>
</table>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>This extension reimplements the Python <a href="http://pythonhosted.org/smartypants/">SmartyPants</a> 
library by intregated it into the markdown parser.
While this does not provide any additional features,
it does offer a few advantages. Notably, it will not 
try to work on highlighted code blocks (using the 
<a href="code_hilite.html">CodeHilite</a> Extension) like the third party library 
has been known to do.</p>
</div>
<h2 id="usage">Usage<a class="headerlink" href="#usage" title="Permanent link">&para;</a></h2>
<p>See <a href="index.html">Extensions</a> for general extension usage, specify <code>smarty</code>
as the name of the extension.</p>
<p>See the <a href="../reference.html#extensions">Library Reference</a> for information about
configuring extensions.</p>
<p>The following options are provided to configure the output (all three are set to <code>True</code> by default):</p>
<table>
<thead>
<tr>
<th>Option</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>smart_dashes</code></td>
<td>whether to convert dashes</td>
</tr>
<tr>
<td><code>smart_quotes</code></td>
<td>whether to convert quotes</td>
</tr>
<tr>
<td><code>smart_ellipses</code></td>
<td>whether to convert ellipses</td>
</tr>
</tbody>
</table>
<h2 id="further-reading">Further reading<a class="headerlink" href="#further-reading" title="Permanent link">&para;</a></h2>
<p>SmartyPants extension is based on the original SmartyPants implementation
by John Gruber. Please read it&rsquo;s <a href="http://daringfireball.net/projects/smartypants/">documentation</a> for details.</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="#smartypants">SmartyPants</a><ul>
<li><a href="#summary">Summary</a></li>
<li><a href="#usage">Usage</a></li>
<li><a href="#further-reading">Further reading</a></li>
</ul>
</li>
</ul>
</div>


    <h4>Previous topic</h4>
      <p class="topless"><a href="sane_lists.html"
         title="previous chapter">Sane Lists Extension</a></p>
    <h4>Next topic</h4>
      <p class="topless"><a href="toc.html"
         title="next chapter">Table of Contents Extension</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="smarty.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="toc.html" title="Table of Contents Extension"
         accesskey="N">next</a> |</li>
    <li class="right">
      <a href="sane_lists.html" title="Sane Lists Extension"
         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>
    <li><a href="index.html">Extensions</a> &raquo;</li>
<li><a href="smarty.html">SmartyPants Extension</a> &raquo;</li>
  </ul>
</div> <!-- .related -->

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