Home | History | Annotate | Download | only in extensions
      1 Tables
      2 ----------------
      3 
      4 Summary
      5 -------
      6 
      7 The Table Extension adds the ability to create tables in Markdown documents.
      8 
      9 This extension is included in the standard Markdown library.
     10 
     11 Syntax
     12 ------
     13 
     14 Tables are defined using the syntax established in [PHP Markdown Extra][php].
     15 
     16 [php]: http://www.michelf.com/projects/php-markdown/extra/#table
     17 
     18 Thus, the following text (taken from the above referenced PHP documentation):
     19 
     20 First Header  | Second Header
     21 ------------- | -------------
     22 Content Cell  | Content Cell
     23 Content Cell  | Content Cell
     24 
     25 will be rendered as:
     26 
     27 <table>
     28 <thead>
     29 <tr>
     30 <th>First Header</th>
     31 <th>Second Header</th>
     32 </tr>
     33 </thead>
     34 <tbody>
     35 <tr>
     36 <td>Content Cell</td>
     37 <td>Content Cell</td>
     38 
     39 </tr>
     40 <tr>
     41 <td>Content Cell</td>
     42 <td>Content Cell</td>
     43 </tr>
     44 </tbody>
     45 </table>
     46 
     47 Usage
     48 -----
     49 
     50 From the Python interpreter:
     51 
     52     >>> html = markdown.markdown(text, ['tables'])
     53 
     54