UNPKG

markdown-it-multimd-table-ext

Version:

Multimarkdown table syntax plugin for markdown-it markdown parser

343 lines (309 loc) 4.54 kB
--- desc: Corner cases unspecified in standard --- Multiple backticks inside inline code . |Shorthands|Functions|Rendered| |----------|---------|--------| |` `` `|`\textquotedblleft`|&ldquo;| |` '' `|`\textquotedblright`|&rdquo;| . <table> <thead> <tr> <th>Shorthands</th> <th>Functions</th> <th>Rendered</th> </tr> </thead> <tbody> <tr> <td><code>``</code></td> <td><code>\textquotedblleft</code></td> <td></td> </tr> <tr> <td><code>''</code></td> <td><code>\textquotedblright</code></td> <td></td> </tr> </tbody> </table> . Multiple backticks as table contents . |Single|Double|Triple|Quadruple|Pentuple|Hextuple|Septuple| |------|------|------|---------|--------|--------|--------| |\`|``|```|````|`````|``````|```````| . <table> <thead> <tr> <th>Single</th> <th>Double</th> <th>Triple</th> <th>Quadruple</th> <th>Pentuple</th> <th>Hextuple</th> <th>Septuple</th> </tr> </thead> <tbody> <tr> <td>`</td> <td>``</td> <td>```</td> <td>````</td> <td>`````</td> <td>``````</td> <td>```````</td> </tr> </tbody> </table> . Literal backtick (`) inside inline code in table data row . | First | Second | | --------- | -------- | | `` ` `` | Content | | ``(`)`` | Content | | ``(\`)`` | Content | | `(``)` | Content | | `(```)` | `(```)` | | `(```)` | `(```)` | . <table> <thead> <tr> <th>First</th> <th>Second</th> </tr> </thead> <tbody> <tr> <td><code>`</code></td> <td>Content</td> </tr> <tr> <td><code>(`)</code></td> <td>Content</td> </tr> <tr> <td><code>(\`)</code></td> <td>Content</td> </tr> <tr> <td><code>(``)</code></td> <td>Content</td> </tr> <tr> <td><code>(```)</code></td> <td><code>(```)</code></td> </tr> <tr> <td><code>(```)</code></td> <td><code>(```)</code></td> </tr> </tbody> </table> . [Issue #1](github.com/RedBug312/markdown-it-multimd-table/issues/1) Indented code disabled in table data row . A | B ------|-- 0|1 . <table> <thead> <tr> <th>A</th> <th>B</th> </tr> </thead> <tbody> <tr> <td>0</td> <td>1</td> </tr> </tbody> </table> . Indented code disabled in table header row . A|B -----:|:- 0|1 . <table> <thead> <tr> <th style="text-align:right">A</th> <th style="text-align:left">B</th> </tr> </thead> <tbody> <tr> <td style="text-align:right">0</td> <td style="text-align:left">1</td> </tr> </tbody> </table> . Indented code enabled in separator . A|B -:|:- 0|1 . <pre><code> A|B -:|:- 0|1 </code></pre> . [Issue #24](github.com/RedBug312/markdown-it-multimd-table/issues/24) Trailing pipes followed with trailing spaces . A|B| -|-| 0|1| . <table> <thead> <tr> <th>A</th> <th>B</th> </tr> </thead> <tbody> <tr> <td>0</td> <td>1</td> </tr> </tbody> </table> . No trailing pipes but trailing spaces . A|B -|- 0|1 . <table> <thead> <tr> <th>A</th> <th>B</th> </tr> </thead> <tbody> <tr> <td>0</td> <td>1</td> </tr> </tbody> </table> . [Issue #32](github.com/RedBug312/markdown-it-multimd-table/issues/32) Table indented under lists with empty line . - list item | Col1 | Col2 | | ----- | ---- | | Col1 | Col2 | . <ul> <li> <p>list item</p> <table> <thead> <tr> <th>Col1</th> <th>Col2</th> </tr> </thead> <tbody> <tr> <td>Col1</td> <td>Col2</td> </tr> </tbody> </table> </li> </ul> . Table indented under lists without empty line . - list item | Col1 | Col2 | | ----- | ---- | | Col1 | Col2 | . <ul> <li>list item <table> <thead> <tr> <th>Col1</th> <th>Col2</th> </tr> </thead> <tbody> <tr> <td>Col1</td> <td>Col2</td> </tr> </tbody> </table> </li> </ul> . [Issue #50](github.com/RedBug312/markdown-it-multimd-table/issues/50) Caption that contains links . make|me ---|--- a|table [caption allows **bold** or [link][repo]] [repo]: https://github.com/redbug312/markdown-it-multimd-table . <table> <caption id="captionallowsboldorlinkrepo" style="caption-side: bottom">caption allows <strong>bold</strong> or <a href="https://github.com/redbug312/markdown-it-multimd-table">link</a></caption> <thead> <tr> <th>make</th> <th>me</th> </tr> </thead> <tbody> <tr> <td>a</td> <td>table</td> </tr> </tbody> </table> . Caption with a label that contains links . make|me ---|--- a|table [caption allows **bold** or [link][repo]][labeled] [repo]: https://github.com/redbug312/markdown-it-multimd-table . <table> <caption id="labeled" style="caption-side: bottom">caption allows <strong>bold</strong> or <a href="https://github.com/redbug312/markdown-it-multimd-table">link</a></caption> <thead> <tr> <th>make</th> <th>me</th> </tr> </thead> <tbody> <tr> <td>a</td> <td>table</td> </tr> </tbody> </table> .