New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

showdown-table

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

showdown-table

Add markdown table favor to showdown

0.0.2
Source
npm
Version published
Weekly downloads
36
-26.53%
Maintainers
1
Weekly downloads
 
Created
Source

Showdown's Table Extension

Build Status npm version npm version

Add markdown table flavor to showdown

Adds support for:

| Col 1   | Col 2                                              |
|======== |====================================================|
|**bold** | ![Valid XHTML] (http://w3.org/Icons/valid-xhtml10) |
| Plain   | Value                                              |

Installation

With npm

npm install showdown-table

With bower

bower install showdown-table

Manual

You can also download the latest release zip or tarball and include it in your webpage, after showdown:

<script src="showdown.min.js">
<script src="showdown-table.min.js">

Enabling the extension

After including the extension in your application, you just need to enable it in showdown.

var converter = new Showdown.converter({extensions: ['table']});

Example

var converter = new Showdown.converter({extensions: ['table']}),
    input = '| Col 1   | Col 2                                              |' +
            '|======== |====================================================|' +
            '|**bold** | ![Valid XHTML] (http://w3.org/Icons/valid-xhtml10) |' +
            '| Plain   | Value                                              |';
    html = converter.makeHtml(input);
    console.log(html);

This should output the equivalent to:

<table>
  <tr>
    <td>Col 1</td>
    <td>Col 2</td>
  </tr>
  <tr>
    <td><strong>bold</strong></td>
    <td><img alt="Valid XHTML" src="http://w3.org/Icons/valid-xhtml10"></td>
  </tr>
  <tr>
    <td>Plain</td>
    <td>Value</td>
  </tr>
</table>

License

These files are distributed under BSD license. For more information, please check the LICENSE file in the source code.

Keywords

markdown

FAQs

Package last updated on 24 Jan 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts