Product
Socket Now Supports uv.lock Files
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
markdown-it-multimd-table
Advanced tools
Multimarkdown table syntax plugin for markdown-it markdown parser
Multimarkdown table syntax plugin for markdown-it markdown parser
Bored with HTML table tags when I need some extended table functions like colspan
in Markdown. I found that MultiMarkdown had defined complete and clear rules for advanced table syntax, which is compatible to standard Markdown table syntax at the same time.
For example, the following features are given:
colspan
attribute<thead>
and <tbody>
So I altered the table parser in markdown-it for the Multimarkdown syntax.
NOTE: This plugin might behave differently from MultiMarkdown for some edging cases; For this plugin was developed mainly under the rules in MultiMarkdown User's Guide. Please impose an issue if you find problems related.
var md = require('markdown-it')()
.use(require('markdown-it-multimd-table'));
md.render(/*...*/)
For test, do this in terminal:
$ npm install markdown-it-multimd-table --prefix .
$ vim test.js
var md = require('markdown-it')()
.use(require('markdown-it-multimd-table'));
const exampleTable =
"| | Grouping || \n" +
"First Header | Second Header | Third Header | \n" +
" ------------ | :-----------: | -----------: | \n" +
"Content | *Long Cell* || \n" +
"Content | **Cell** | Cell | \n" +
" \n" +
"New section | More | Data | \n" +
"And more | With an escaped '\|' ||\n" +
"[Prototype table] \n";
console.log(md.render(exampleTable));
$ node test.js > test.html
$ firefox test.html
You might see the table in browser:
Grouping | ||
---|---|---|
First Header | Second Header | Third Header |
Content | Long Cell | |
Content | Cell | Cell |
New section | More | Data |
And more | With an escaped '|' |
Allow table rows parsed as multiple lines with end-of-the-line backslashes, the feature is contributed by Lucas-C.
First header | Second header
-------------|---------------
List: | More \
- over | data \
- several | \
- lines |
would be parsed as
First header | Second header |
---|---|
List:
|
More data |
To enable this feature, you have to set the option:
var md = require('markdown-it')()
.use(require('markdown-it-multimd-table'), {enableMultilineRows: true});
This software is licensed under the MIT license © RedBug312.
FAQs
Multimarkdown table syntax plugin for markdown-it markdown parser
The npm package markdown-it-multimd-table receives a total of 11,138 weekly downloads. As such, markdown-it-multimd-table popularity was classified as popular.
We found that markdown-it-multimd-table demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.