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 3.2.1 to 3.2.2

7

dist/markdown-it-multimd-table.js

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

/*! markdown-it-multimd-table 3.2.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){
/*! markdown-it-multimd-table 3.2.2 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';

@@ -151,4 +151,5 @@

for (var i = 0, col = 0; i < rowInfo.columns.length && col < separatorInfo.aligns.length;
col += rowInfo.colspans[i], i++) {
for (var i = 0, col = 0;
i < rowInfo.columns.length && col < separatorInfo.aligns.length;
col += rowInfo.colspans[i], i++) {
if (pluginOptions.enableRowspan &&

@@ -155,0 +156,0 @@ rowspanState && rowspanState[i] &&

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

!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).markdownitMultimdTable=e()}}(function(){return function(){return function e(t,n,r){function a(o,i){if(!n[o]){if(!t[o]){var u="function"==typeof require&&require;if(!i&&u)return u(o,!0);if(s)return s(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[o]={exports:{}};t[o][0].call(c.exports,function(e){return a(t[o][1][e]||e)},c,c.exports,e,t,n,r)}return n[o].exports}for(var s="function"==typeof require&&require,o=0;o<r.length;o++)a(r[o]);return a}}()({1:[function(e,t,n){"use strict";t.exports=function(e,t){function n(e,t){var n=e.bMarks[t]+e.blkIndent,r=e.eMarks[t];return e.src.slice(n,r)}function r(e){for(var t=[],n=e.length,r=0,a=!1,s=!1,o=0;o<n;o++)switch(e.charCodeAt(o)){case 92:a=!0;break;case 96:!s&&a||(s=!s),a=!1;break;case 124:s||a||(t.push(e.slice(r,o)),r=o+1),a=!1;break;default:a=!1}return t.push(e.slice(r)),t}function a(e,t,n,r){var a=t.match(/^\[([^\[\]]+)\](\[([^\[\]]+)\])?\s*$/);if(!a)return!1;if(r)return!0;var s,o={caption:null,label:null};return o.content=a[1],o.label=a[2]||a[1],(s=e.push("caption_open","caption",1)).map=[n,n+1],s.attrs=[["id",o.label.toLowerCase().replace(/\W+/g,"")]],(s=e.push("inline","",0)).content=o.content,s.map=[n,n+1],s.children=[],s=e.push("caption_close","caption",-1),o}function s(e,t,n,r){var a,s,o,i;(a=t.split(/\n/).length)>1?(o=new(s=e.md.block).State(t,e.md,e.env,e.tokens),s.tokenize(o,0,a)):((i=e.push("inline","",0)).content=t,i.map=[n,r],i.children=[])}function o(e,a,o,i,u,l,c){var p,f;if(p={colspans:null,columns:null,extractedTextLinesCount:1},1===(f=r(a.replace(/^\||([^\\])\|$/g,"$1"))).length&&!/^\||[^\\]\|$/.test(a))return!1;if(i)return!0;if(t.enableMultilineRows&&"\\"===a.slice(-1)){var h,d,b,g=Function.prototype.call.bind(String.prototype.trim);f=(f=r(a.replace(/\\$/,"").replace(/^\||([^\\])\|$/g,"$1"))).map(g);do{if(d=r((h=n(e,o+p.extractedTextLinesCount)).replace(/\\$/,"").replace(/^\||([^\\])\|$/g,"$1")),b="\\"!==h.slice(-1),1===d.length&&!/^\||[^\\]\|$|\\$/.test(h))return!1;if(d.length!==f.length&&!b)return!1;for(var m=0;m<d.length;m++)f[m]=f[m]||"",f[m]+="\n"+d[m].trim();p.extractedTextLinesCount+=1}while(!b)}var x=RegExp.prototype.test.bind(/[^\n]/);p.columns=f.filter(x),p.colspans=function(e){for(var t=0,n=[],r=e.length-1;r>=0;r--)e[r]?(n.unshift(t+1),t=0):t++;return t>0&&n.unshift(t+1),n}(f.map(x));var k=e.push("tr_open","tr",1);k.map=[o,o+p.extractedTextLinesCount];for(var v=0,w=0;v<p.columns.length&&w<u.aligns.length;w+=p.colspans[v],v++)if(t.enableRowspan&&c&&c[v]&&/^\s*\^\^\s*$/.test(p.columns[v])){var y=c[v].attrs.find(function(e){return"rowspan"===e[0]});y||(y=["rowspan",1],c[v].attrs.push(y)),y[1]++}else(k=e.push(l+"_open",l,1)).map=[o,o+p.extractedTextLinesCount],k.attrs=[],c[v]={attrs:k.attrs},u.aligns[w]&&k.attrs.push(["style","text-align:"+u.aligns[w]]),u.wraps[w]&&k.attrs.push(["class","extend"]),p.colspans[v]>1&&k.attrs.push(["colspan",p.colspans[v]]),s(e,p.columns[v].trim(),o,o+p.extractedTextLinesCount),k=e.push(l+"_close",l,-1);return e.push("tr_close","tr",-1),p}function i(e,t,n,a){if(e.sCount[n]-e.blkIndent>=4)return!1;var s=r(t.replace(/^\||([^\\])\|$/g,"$1"));if(1===s.length&&!/^\||[^\\]\|$/.test(t))return!1;for(var o={aligns:[],wraps:[]},i=0;i<s.length;i++){var u=s[i].trim();if(!/^:?(-+|=+):?\+?$/.test(u))return!1;switch(o.wraps.push(43===u.charCodeAt(u.length-1)),o.wraps[i]&&(u=u.slice(0,-1)),((58===u.charCodeAt(0))<<4)+(58===u.charCodeAt(u.length-1))){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 a||o}t=t||{},e.block.ruler.at("table",function(e,t,r,s){var u,l,c,p,f,h={65536:function(e,t,n){return a(e,n,t,!0)},4096:function(e,t,n){return i(e,n,t)},256:function(e,t,n){return o(e,n,t,!0,null,"th")},16:function(e,t,n){return o(e,n,t,!0,null,"td")},1:function(e,t,n){return!n}},d={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}};if(t+2>r)return!1;var b,g,m,x,k=!1;for(u=65792,l=t;u&&l<r;l++){for(p=n(e,l).trim(),c=65536;c>0&&!(u&c&&h[c].call(this,e,l,p));c>>=4);switch(c){case 65536:65792===u&&(k=!0);break;case 4096:if(f=i(e,p,l),s)return!0;break;case 256:case 16:case 1:break;case 0:if(256&u)return!1}u=d[u][c]||0}if(!f)return!1;for(e.push("table_open","table",1).map=b=[t,0],u=65792,l=t;u&&l<r;l++){for(p=n(e,l).trim(),c=65536;c>0&&!(u&c&&h[c].call(this,e,l,p));c>>=4);switch(c){case 65536:65792!==u&&(m[1]=l,e.push("tbody_close","tbody",-1)),65792!==u&&k?l--:a(e,p,l,!1);break;case 4096:g[1]=l,e.push("thead_close","thead",-1);break;case 256:4352!==u&&(e.push("thead_open","thead",1).map=g=[l+1,0],x=[]),l+=o(e,p,l,!1,f,"th",x).extractedTextLinesCount-1;break;case 16:65553!==u&&(e.push("tbody_open","tbody",1).map=m=[l+1,0],x=[]),l+=o(e,p,l,!1,f,"td",x).extractedTextLinesCount-1;break;case 1:m[1]=l,e.push("tbody_close","tbody",-1);break;case 0:l--}u=d[u][c]||0}return m&&!m[1]&&(m[1]=l,e.push("tbody_close","tbody",-1)),b[1]=l,e.push("table_close","table",-1),e.line=l,!0},{alt:["paragraph","reference"]})}},{}]},{},[1])(1)});
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).markdownitMultimdTable=e()}}(function(){return function e(t,n,r){function a(o,i){if(!n[o]){if(!t[o]){var l="function"==typeof require&&require;if(!i&&l)return l(o,!0);if(s)return s(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[o]={exports:{}};t[o][0].call(c.exports,function(e){return a(t[o][1][e]||e)},c,c.exports,e,t,n,r)}return n[o].exports}for(var s="function"==typeof require&&require,o=0;o<r.length;o++)a(r[o]);return a}({1:[function(e,t,n){"use strict";t.exports=function(e,t){function n(e,t){var n=e.bMarks[t]+e.blkIndent,r=e.eMarks[t];return e.src.slice(n,r)}function r(e){for(var t=[],n=e.length,r=0,a=!1,s=!1,o=0;o<n;o++)switch(e.charCodeAt(o)){case 92:a=!0;break;case 96:!s&&a||(s=!s),a=!1;break;case 124:s||a||(t.push(e.slice(r,o)),r=o+1),a=!1;break;default:a=!1}return t.push(e.slice(r)),t}function a(e,t,n,r){var a=t.match(/^\[([^\[\]]+)\](\[([^\[\]]+)\])?\s*$/);if(!a)return!1;if(r)return!0;var s,o={caption:null,label:null};return o.content=a[1],o.label=a[2]||a[1],(s=e.push("caption_open","caption",1)).map=[n,n+1],s.attrs=[["id",o.label.toLowerCase().replace(/\W+/g,"")]],(s=e.push("inline","",0)).content=o.content,s.map=[n,n+1],s.children=[],s=e.push("caption_close","caption",-1),o}function s(e,t,n,r){var a,s,o,i;(a=t.split(/\n/).length)>1?(o=new(s=e.md.block).State(t,e.md,e.env,e.tokens),s.tokenize(o,0,a)):((i=e.push("inline","",0)).content=t,i.map=[n,r],i.children=[])}function o(e,a,o,i,l,u,c){var p,f;if(p={colspans:null,columns:null,extractedTextLinesCount:1},1===(f=r(a.replace(/^\||([^\\])\|$/g,"$1"))).length&&!/^\||[^\\]\|$/.test(a))return!1;if(i)return!0;if(t.enableMultilineRows&&"\\"===a.slice(-1)){var h,d,b,g=Function.prototype.call.bind(String.prototype.trim);f=(f=r(a.replace(/\\$/,"").replace(/^\||([^\\])\|$/g,"$1"))).map(g);do{if(d=r((h=n(e,o+p.extractedTextLinesCount)).replace(/\\$/,"").replace(/^\||([^\\])\|$/g,"$1")),b="\\"!==h.slice(-1),1===d.length&&!/^\||[^\\]\|$|\\$/.test(h))return!1;if(d.length!==f.length&&!b)return!1;for(var m=0;m<d.length;m++)f[m]=f[m]||"",f[m]+="\n"+d[m].trim();p.extractedTextLinesCount+=1}while(!b)}var x=RegExp.prototype.test.bind(/[^\n]/);p.columns=f.filter(x),p.colspans=function(e){for(var t=0,n=[],r=e.length-1;r>=0;r--)e[r]?(n.unshift(t+1),t=0):t++;return t>0&&n.unshift(t+1),n}(f.map(x));var k=e.push("tr_open","tr",1);k.map=[o,o+p.extractedTextLinesCount];for(var v=0,w=0;v<p.columns.length&&w<l.aligns.length;w+=p.colspans[v],v++)if(t.enableRowspan&&c&&c[v]&&/^\s*\^\^\s*$/.test(p.columns[v])){var y=c[v].attrs.find(function(e){return"rowspan"===e[0]});y||(y=["rowspan",1],c[v].attrs.push(y)),y[1]++}else(k=e.push(u+"_open",u,1)).map=[o,o+p.extractedTextLinesCount],k.attrs=[],c[v]={attrs:k.attrs},l.aligns[w]&&k.attrs.push(["style","text-align:"+l.aligns[w]]),l.wraps[w]&&k.attrs.push(["class","extend"]),p.colspans[v]>1&&k.attrs.push(["colspan",p.colspans[v]]),s(e,p.columns[v].trim(),o,o+p.extractedTextLinesCount),k=e.push(u+"_close",u,-1);return e.push("tr_close","tr",-1),p}function i(e,t,n,a){if(e.sCount[n]-e.blkIndent>=4)return!1;var s=r(t.replace(/^\||([^\\])\|$/g,"$1"));if(1===s.length&&!/^\||[^\\]\|$/.test(t))return!1;for(var o={aligns:[],wraps:[]},i=0;i<s.length;i++){var l=s[i].trim();if(!/^:?(-+|=+):?\+?$/.test(l))return!1;switch(o.wraps.push(43===l.charCodeAt(l.length-1)),o.wraps[i]&&(l=l.slice(0,-1)),((58===l.charCodeAt(0))<<4)+(58===l.charCodeAt(l.length-1))){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 a||o}t=t||{},e.block.ruler.at("table",function(e,t,r,s){var l,u,c,p,f,h={65536:function(e,t,n){return a(e,n,t,!0)},4096:function(e,t,n){return i(e,n,t)},256:function(e,t,n){return o(e,n,t,!0,null,"th")},16:function(e,t,n){return o(e,n,t,!0,null,"td")},1:function(e,t,n){return!n}},d={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}};if(t+2>r)return!1;var b,g,m,x,k=!1;for(l=65792,u=t;l&&u<r;u++){for(p=n(e,u).trim(),c=65536;c>0&&!(l&c&&h[c].call(this,e,u,p));c>>=4);switch(c){case 65536:65792===l&&(k=!0);break;case 4096:if(f=i(e,p,u),s)return!0;break;case 256:case 16:case 1:break;case 0:if(256&l)return!1}l=d[l][c]||0}if(!f)return!1;for(e.push("table_open","table",1).map=b=[t,0],l=65792,u=t;l&&u<r;u++){for(p=n(e,u).trim(),c=65536;c>0&&!(l&c&&h[c].call(this,e,u,p));c>>=4);switch(c){case 65536:65792!==l&&(m[1]=u,e.push("tbody_close","tbody",-1)),65792!==l&&k?u--:a(e,p,u,!1);break;case 4096:g[1]=u,e.push("thead_close","thead",-1);break;case 256:4352!==l&&(e.push("thead_open","thead",1).map=g=[u+1,0],x=[]),u+=o(e,p,u,!1,f,"th",x).extractedTextLinesCount-1;break;case 16:65553!==l&&(e.push("tbody_open","tbody",1).map=m=[u+1,0],x=[]),u+=o(e,p,u,!1,f,"td",x).extractedTextLinesCount-1;break;case 1:m[1]=u,e.push("tbody_close","tbody",-1);break;case 0:u--}l=d[l][c]||0}return m&&!m[1]&&(m[1]=u,e.push("tbody_close","tbody",-1)),b[1]=u,e.push("table_close","table",-1),e.line=u,!0},{alt:["paragraph","reference"]})}},{}]},{},[1])(1)});

@@ -150,4 +150,5 @@ 'use strict';

for (var i = 0, col = 0; i < rowInfo.columns.length && col < separatorInfo.aligns.length;
col += rowInfo.colspans[i], i++) {
for (var i = 0, col = 0;
i < rowInfo.columns.length && col < separatorInfo.aligns.length;
col += rowInfo.colspans[i], i++) {
if (pluginOptions.enableRowspan &&

@@ -154,0 +155,0 @@ rowspanState && rowspanState[i] &&

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

@@ -30,10 +30,10 @@ "keywords": [

"devDependencies": {
"browserify": "*",
"coveralls": "~2.11.9",
"eslint": ">=4.18.2",
"browserify": "^16.3.0",
"coveralls": "^3.0.4",
"eslint": "^6.0.1",
"istanbul": "^0.4.5",
"markdown-it-testgen": "~0.1.3",
"mocha": "^5.2.0",
"terser": "^3.16.1"
"markdown-it-testgen": "^0.1.3",
"mocha": "^6.1.4",
"terser": "^4.1.2"
}
}

Sorry, the diff of this file is not supported yet

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