Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

markdown-it-multimd-table

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markdown-it-multimd-table - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

4

dist/markdown-it-multimd-table.js

@@ -1,2 +0,2 @@

/*! markdown-it-multimd-table 4.0.0 https://github.com/RedBug312/markdown-it-multimd-table @license MIT */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.markdownitMultimdTable = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
/*! markdown-it-multimd-table 4.0.1 https://github.com/RedBug312/markdown-it-multimd-table @license MIT */(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.markdownitMultimdTable = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
'use strict';

@@ -85,3 +85,3 @@

var start = state.bMarks[line], /* no tShift to detect \n */
max = state.eMarks[line],
max = state.skipSpacesBack(state.eMarks[line], start),
bounds = [], pos,

@@ -88,0 +88,0 @@ escape = false, code = false;

@@ -1,1 +0,1 @@

!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).markdownitMultimdTable=t()}}(function(){return function t(e,a,s){function n(r,o){if(!a[r]){if(!e[r]){var p="function"==typeof require&&require;if(!o&&p)return p(r,!0);if(i)return i(r,!0);var l=new Error("Cannot find module '"+r+"'");throw l.code="MODULE_NOT_FOUND",l}var _=a[r]={exports:{}};e[r][0].call(_.exports,function(t){return n(e[r][1][t]||t)},_,_.exports,t,e,a,s)}return a[r].exports}for(var i="function"==typeof require&&require,r=0;r<s.length;r++)n(s[r]);return n}({1:[function(t,e,a){"use strict";function s(){this.__highest_alphabet__=0,this.__match_alphabets__={},this.__initial_state__=0,this.__accept_states__={},this.__transitions__={},this.__actions__={}}s.prototype.set_highest_alphabet=function(t){this.__highest_alphabet__=t},s.prototype.set_match_alphabets=function(t){this.__match_alphabets__=t},s.prototype.set_initial_state=function(t){this.__initial_state__=t},s.prototype.set_accept_states=function(t){for(var e=0;e<t.length;e++)this.__accept_states__[t[e]]=!0},s.prototype.set_transitions=function(t){this.__transitions__=t},s.prototype.set_actions=function(t){this.__actions__=t},s.prototype.update_transition=function(t,e){this.__transitions__[t]=Object.assign(this.__transitions__[t]||Object(),e)},s.prototype.execute=function(t,e){var a,s,n;for(a=this.__initial_state__,s=t;a&&s<e;s++){for(n=this.__highest_alphabet__;n>0&&!(a&n&&this.__match_alphabets__[n].call(this,s,a,n));n>>=4);if(this.__actions__(s,a,n),0===n)break;a=this.__transitions__[a][n]||0}return!!this.__accept_states__[a]},e.exports=s},{}],2:[function(t,e,a){"use strict";var s=t("./lib/dfa.js");e.exports=function(t,e){function a(t,e){var a,s=t.bMarks[e],n=t.eMarks[e],i=[],r=!1,o=!1;for(a=s;a<n;a++)switch(t.src.charCodeAt(a)){case 92:r=!0;break;case 96:!o&&r||(o=!o),96===t.src.charCodeAt(a-1)&&(o=!1),r=!1;break;case 124:o||r||i.push(a),r=!1;break;default:r=!1}return 0===i.length?i:(i[0]>s&&i.unshift(s-1),i[i.length-1]<n-1&&i.push(n),i)}function n(t,e,a){var s=t.bMarks[a]+t.tShift[a],n=t.eMarks[a],i=t.src.slice(s,n).match(/^\[([^\[\]]+)\](\[([^\[\]]+)\])?\s*$/),r={};return!!i&&(!!e||(r.text=i[1],r.label=i[2]||i[1],r.label=r.label.toLowerCase().replace(/\W+/g,""),r))}function i(t,s,n){var i,r,o,p=a(t,n),l={};return!(p.length<2)&&(!!s||(l.bounds=p,e.multiline&&(i=t.bMarks[n]+t.tShift[n],r=t.eMarks[n]-1,l.multiline=92===t.src.charCodeAt(r),l.multiline&&(o=t.eMarks[n],t.eMarks[n]=t.skipSpacesBack(r,i),l.bounds=a(t,n),t.eMarks[n]=o)),l))}function r(t,e,s){var n,i,r=a(t,s),o={aligns:[],wraps:[]},p=/^:?(-+|=+):?\+?$/;if(t.sCount[s]-t.blkIndent>=4)return!1;if(0===r.length)return!1;for(n=0;n<r.length-1;n++){if(i=t.src.slice(r[n]+1,r[n+1]).trim(),!p.test(i))return!1;switch(o.wraps.push(43===i.charCodeAt(i.length-1)),(58===i.charCodeAt(0))<<4|58===i.charCodeAt(i.length-1-o.wraps[n])){case 0:o.aligns.push("");break;case 1:o.aligns.push("right");break;case 16:o.aligns.push("left");break;case 17:o.aligns.push("center")}}return!!e||o}function o(t,e,a){return t.bMarks[a]+t.tShift[a]===t.eMarks[a]}e=e||{},t.block.ruler.at("table",function(t,a,p,l){var _,c,u,h,m,f,b,d,g,k,w,y,v,x,M=new s,C=16,j=-1,A=[];if(a+2>p)return!1;if((c=new t.Token("table_open","table",1)).meta={sep:null,cap:null,tr:[]},M.set_highest_alphabet(65536),M.set_initial_state(65792),M.set_accept_states([65552,65553,0]),M.set_match_alphabets({65536:n.bind(this,t,!0),4096:r.bind(this,t,!0),256:i.bind(this,t,!0),16:i.bind(this,t,!0),1:o.bind(this,t,!0)}),M.set_transitions({65792:{65536:256,256:4352},256:{256:4352},4352:{4096:65552,256:4352},65552:{65536:0,16:65553},65553:{65536:0,16:65553,1:65552}}),e.headerless&&(M.set_initial_state(69888),M.update_transition(69888,{65536:4352,4096:65552,256:4352}),(u=new t.Token("table_fake_header_row","tr",1)).meta=Object()),M.set_actions(function(s,o,p){switch(p){case 65536:if(c.meta.cap)break;c.meta.cap=n(t,!1,s),c.meta.cap.map=[s,s+1],c.meta.cap.first=s===a;break;case 4096:c.meta.sep=r(t,!1,s),c.meta.sep.map=[s,s+1],u.meta.grp|=1,C=16;break;case 256:case 16:(u=new t.Token("table_row_open","tr",1)).map=[s,s+1],u.meta=i(t,!1,s),u.meta.type=p,u.meta.grp=C,C=0,c.meta.tr.push(u),e.multiline&&(u.meta.multiline&&j<0?j=c.meta.tr.length-1:!u.meta.multiline&&j>=0&&((_=c.meta.tr[j]).meta.mbounds=c.meta.tr.slice(j).map(function(t){return t.meta.bounds}),_.map[1]=u.map[1],c.meta.tr=c.meta.tr.slice(0,j+1),j=-1));break;case 1:u.meta.grp|=1,C=16}}),!1===M.execute(a,p))return!1;if(!c.meta.tr.length)return!1;if(l)return!0;for(c.meta.tr[c.meta.tr.length-1].meta.grp|=1,c.map=b=[a,0],c.block=!0,c.level=t.level++,t.tokens.push(c),c.meta.cap&&((_=t.push("caption_open","caption",1)).map=c.meta.cap.map,_.attrs=[["id",c.meta.cap.label]],(_=t.push("inline","",0)).content=c.meta.cap.text,_.map=c.meta.cap.map,_.children=[],_=t.push("caption_close","caption",-1)),y=0;y<c.meta.tr.length;y++){for(m=new t.Token("table_fake_tcol_open","",1),16&(u=c.meta.tr[y]).meta.grp&&(g=256===u.meta.type?"thead":"tbody",(_=t.push("table_group_open",g,1)).map=d=[u.map[0],0],A=[]),u.block=!0,u.level=t.level++,t.tokens.push(u),v=0;v<u.meta.bounds.length-1;v++)if(w=[u.meta.bounds[v]+1,u.meta.bounds[v+1]],""!==(k=t.src.slice.apply(t.src,w)))if(e.rowspan&&A[v]&&"^^"===k.trim())f=A[v].attrGet("rowspan"),A[v].attrSet("rowspan",null===f?2:f+1);else{if(g=256===u.meta.type?"th":"td",(_=t.push("table_column_open",g,1)).map=u.map,_.attrs=[],c.meta.sep.aligns[v]&&_.attrs.push(["style","text-align:"+c.meta.sep.aligns[v]]),c.meta.sep.wraps[v]&&_.attrs.push(["class","extend"]),m=A[v]=_,e.multiline&&u.meta.multiline&&u.meta.mbounds){for(k=[k.trimRight()],x=1;x<u.meta.mbounds.length;x++)v>u.meta.mbounds[x].length-2||(w=[u.meta.mbounds[x][v]+1,u.meta.mbounds[x][v+1]],k.push(t.src.slice.apply(t.src,w).trimRight()));t.md.block.parse(k.join("\n"),t.md,t.env,t.tokens)}else(_=t.push("inline","",0)).content=k.trim(),_.map=u.map,_.children=[];_=t.push("table_column_close",g,-1)}else h=m.attrGet("colspan"),m.attrSet("colspan",null===h?2:h+1);t.push("tr_close","tr",-1),1&u.meta.grp&&(g=256===u.meta.type?"thead":"tbody",_=t.push("table_group_close",g,-1),d[1]=u.map[1])}return b[1]=Math.max(d[1],c.meta.sep.map[1],c.meta.cap?c.meta.cap.map[1]:-1),_=t.push("table_close","table",-1),t.line=b[1],!0},{alt:["paragraph","reference"]})}},{"./lib/dfa.js":1}]},{},[2])(2)});
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).markdownitMultimdTable=t()}}(function(){return function t(e,a,s){function n(r,o){if(!a[r]){if(!e[r]){var p="function"==typeof require&&require;if(!o&&p)return p(r,!0);if(i)return i(r,!0);var l=new Error("Cannot find module '"+r+"'");throw l.code="MODULE_NOT_FOUND",l}var _=a[r]={exports:{}};e[r][0].call(_.exports,function(t){return n(e[r][1][t]||t)},_,_.exports,t,e,a,s)}return a[r].exports}for(var i="function"==typeof require&&require,r=0;r<s.length;r++)n(s[r]);return n}({1:[function(t,e,a){"use strict";function s(){this.__highest_alphabet__=0,this.__match_alphabets__={},this.__initial_state__=0,this.__accept_states__={},this.__transitions__={},this.__actions__={}}s.prototype.set_highest_alphabet=function(t){this.__highest_alphabet__=t},s.prototype.set_match_alphabets=function(t){this.__match_alphabets__=t},s.prototype.set_initial_state=function(t){this.__initial_state__=t},s.prototype.set_accept_states=function(t){for(var e=0;e<t.length;e++)this.__accept_states__[t[e]]=!0},s.prototype.set_transitions=function(t){this.__transitions__=t},s.prototype.set_actions=function(t){this.__actions__=t},s.prototype.update_transition=function(t,e){this.__transitions__[t]=Object.assign(this.__transitions__[t]||Object(),e)},s.prototype.execute=function(t,e){var a,s,n;for(a=this.__initial_state__,s=t;a&&s<e;s++){for(n=this.__highest_alphabet__;n>0&&!(a&n&&this.__match_alphabets__[n].call(this,s,a,n));n>>=4);if(this.__actions__(s,a,n),0===n)break;a=this.__transitions__[a][n]||0}return!!this.__accept_states__[a]},e.exports=s},{}],2:[function(t,e,a){"use strict";var s=t("./lib/dfa.js");e.exports=function(t,e){function a(t,e){var a,s=t.bMarks[e],n=t.skipSpacesBack(t.eMarks[e],s),i=[],r=!1,o=!1;for(a=s;a<n;a++)switch(t.src.charCodeAt(a)){case 92:r=!0;break;case 96:!o&&r||(o=!o),96===t.src.charCodeAt(a-1)&&(o=!1),r=!1;break;case 124:o||r||i.push(a),r=!1;break;default:r=!1}return 0===i.length?i:(i[0]>s&&i.unshift(s-1),i[i.length-1]<n-1&&i.push(n),i)}function n(t,e,a){var s=t.bMarks[a]+t.tShift[a],n=t.eMarks[a],i=t.src.slice(s,n).match(/^\[([^\[\]]+)\](\[([^\[\]]+)\])?\s*$/),r={};return!!i&&(!!e||(r.text=i[1],r.label=i[2]||i[1],r.label=r.label.toLowerCase().replace(/\W+/g,""),r))}function i(t,s,n){var i,r,o,p=a(t,n),l={};return!(p.length<2)&&(!!s||(l.bounds=p,e.multiline&&(i=t.bMarks[n]+t.tShift[n],r=t.eMarks[n]-1,l.multiline=92===t.src.charCodeAt(r),l.multiline&&(o=t.eMarks[n],t.eMarks[n]=t.skipSpacesBack(r,i),l.bounds=a(t,n),t.eMarks[n]=o)),l))}function r(t,e,s){var n,i,r=a(t,s),o={aligns:[],wraps:[]},p=/^:?(-+|=+):?\+?$/;if(t.sCount[s]-t.blkIndent>=4)return!1;if(0===r.length)return!1;for(n=0;n<r.length-1;n++){if(i=t.src.slice(r[n]+1,r[n+1]).trim(),!p.test(i))return!1;switch(o.wraps.push(43===i.charCodeAt(i.length-1)),(58===i.charCodeAt(0))<<4|58===i.charCodeAt(i.length-1-o.wraps[n])){case 0:o.aligns.push("");break;case 1:o.aligns.push("right");break;case 16:o.aligns.push("left");break;case 17:o.aligns.push("center")}}return!!e||o}function o(t,e,a){return t.bMarks[a]+t.tShift[a]===t.eMarks[a]}e=e||{},t.block.ruler.at("table",function(t,a,p,l){var _,c,u,h,m,f,b,d,g,k,w,y,v,x,M=new s,C=16,j=-1,S=[];if(a+2>p)return!1;if((c=new t.Token("table_open","table",1)).meta={sep:null,cap:null,tr:[]},M.set_highest_alphabet(65536),M.set_initial_state(65792),M.set_accept_states([65552,65553,0]),M.set_match_alphabets({65536:n.bind(this,t,!0),4096:r.bind(this,t,!0),256:i.bind(this,t,!0),16:i.bind(this,t,!0),1:o.bind(this,t,!0)}),M.set_transitions({65792:{65536:256,256:4352},256:{256:4352},4352:{4096:65552,256:4352},65552:{65536:0,16:65553},65553:{65536:0,16:65553,1:65552}}),e.headerless&&(M.set_initial_state(69888),M.update_transition(69888,{65536:4352,4096:65552,256:4352}),(u=new t.Token("table_fake_header_row","tr",1)).meta=Object()),M.set_actions(function(s,o,p){switch(p){case 65536:if(c.meta.cap)break;c.meta.cap=n(t,!1,s),c.meta.cap.map=[s,s+1],c.meta.cap.first=s===a;break;case 4096:c.meta.sep=r(t,!1,s),c.meta.sep.map=[s,s+1],u.meta.grp|=1,C=16;break;case 256:case 16:(u=new t.Token("table_row_open","tr",1)).map=[s,s+1],u.meta=i(t,!1,s),u.meta.type=p,u.meta.grp=C,C=0,c.meta.tr.push(u),e.multiline&&(u.meta.multiline&&j<0?j=c.meta.tr.length-1:!u.meta.multiline&&j>=0&&((_=c.meta.tr[j]).meta.mbounds=c.meta.tr.slice(j).map(function(t){return t.meta.bounds}),_.map[1]=u.map[1],c.meta.tr=c.meta.tr.slice(0,j+1),j=-1));break;case 1:u.meta.grp|=1,C=16}}),!1===M.execute(a,p))return!1;if(!c.meta.tr.length)return!1;if(l)return!0;for(c.meta.tr[c.meta.tr.length-1].meta.grp|=1,c.map=b=[a,0],c.block=!0,c.level=t.level++,t.tokens.push(c),c.meta.cap&&((_=t.push("caption_open","caption",1)).map=c.meta.cap.map,_.attrs=[["id",c.meta.cap.label]],(_=t.push("inline","",0)).content=c.meta.cap.text,_.map=c.meta.cap.map,_.children=[],_=t.push("caption_close","caption",-1)),y=0;y<c.meta.tr.length;y++){for(m=new t.Token("table_fake_tcol_open","",1),16&(u=c.meta.tr[y]).meta.grp&&(g=256===u.meta.type?"thead":"tbody",(_=t.push("table_group_open",g,1)).map=d=[u.map[0],0],S=[]),u.block=!0,u.level=t.level++,t.tokens.push(u),v=0;v<u.meta.bounds.length-1;v++)if(w=[u.meta.bounds[v]+1,u.meta.bounds[v+1]],""!==(k=t.src.slice.apply(t.src,w)))if(e.rowspan&&S[v]&&"^^"===k.trim())f=S[v].attrGet("rowspan"),S[v].attrSet("rowspan",null===f?2:f+1);else{if(g=256===u.meta.type?"th":"td",(_=t.push("table_column_open",g,1)).map=u.map,_.attrs=[],c.meta.sep.aligns[v]&&_.attrs.push(["style","text-align:"+c.meta.sep.aligns[v]]),c.meta.sep.wraps[v]&&_.attrs.push(["class","extend"]),m=S[v]=_,e.multiline&&u.meta.multiline&&u.meta.mbounds){for(k=[k.trimRight()],x=1;x<u.meta.mbounds.length;x++)v>u.meta.mbounds[x].length-2||(w=[u.meta.mbounds[x][v]+1,u.meta.mbounds[x][v+1]],k.push(t.src.slice.apply(t.src,w).trimRight()));t.md.block.parse(k.join("\n"),t.md,t.env,t.tokens)}else(_=t.push("inline","",0)).content=k.trim(),_.map=u.map,_.children=[];_=t.push("table_column_close",g,-1)}else h=m.attrGet("colspan"),m.attrSet("colspan",null===h?2:h+1);t.push("tr_close","tr",-1),1&u.meta.grp&&(g=256===u.meta.type?"thead":"tbody",_=t.push("table_group_close",g,-1),d[1]=u.map[1])}return b[1]=Math.max(d[1],c.meta.sep.map[1],c.meta.cap?c.meta.cap.map[1]:-1),_=t.push("table_close","table",-1),t.line=b[1],!0},{alt:["paragraph","reference"]})}},{"./lib/dfa.js":1}]},{},[2])(2)});

@@ -10,3 +10,3 @@ 'use strict';

var start = state.bMarks[line], /* no tShift to detect \n */
max = state.eMarks[line],
max = state.skipSpacesBack(state.eMarks[line], start),
bounds = [], pos,

@@ -13,0 +13,0 @@ escape = false, code = false;

{
"name": "markdown-it-multimd-table",
"version": "4.0.0",
"version": "4.0.1",
"description": "Multimarkdown table syntax plugin for markdown-it markdown parser",

@@ -5,0 +5,0 @@ "keywords": [

[![NPM version](https://img.shields.io/npm/v/markdown-it-multimd-table.svg?style=flat)](https://www.npmjs.org/package/markdown-it-multimd-table)
[![Build Status](https://travis-ci.org/RedBug312/markdown-it-multimd-table.svg?branch=master)](https://travis-ci.org/RedBug312/markdown-it-multimd-table)
[![Build Status](https://api.travis-ci.org/RedBug312/markdown-it-multimd-table.svg?branch=master)](https://travis-ci.com/RedBug312/markdown-it-multimd-table)
[![Coverage Status](https://coveralls.io/repos/github/RedBug312/markdown-it-multimd-table/badge.svg?branch=master)](https://coveralls.io/github/RedBug312/markdown-it-multimd-table?branch=master)

@@ -4,0 +4,0 @@

@@ -66,1 +66,50 @@ ---

.
[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>
.

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc