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

markademic

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markademic - npm Package Compare versions

Comparing version 0.14.1 to 0.14.3

dist/markademic.js.LICENSE.txt

9

dist/markademic.js

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

module.exports=function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=2)}([function(t,e){t.exports=require("katex")},function(t,e){var r={utf8:{stringToBytes:function(t){return r.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(r.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var e=[],r=0;r<t.length;r++)e.push(255&t.charCodeAt(r));return e},bytesToString:function(t){for(var e=[],r=0;r<t.length;r++)e.push(String.fromCharCode(t[r]));return e.join("")}}};t.exports=r},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(3),i=r(6),o=r(7),a=r(8);e.default=function(t){var e=i.default(t.input);return e=void 0!==e?n.default(e):n.default(t.input),t.rerouteLinks&&(e=o.default(e,t.rerouteLinks)),t.symbols&&(e=a.symbolRender(e,t.symbols)),t.citations&&(e=a.citationsRender(e,t.citations)),e}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(4),i=r(5),o=new n.Remarkable({html:!0,highlight:function(t,e){if(e&&i.getLanguage(e))try{return i.highlight(e,t).value}catch(t){}try{return i.highlightAuto(t).value}catch(t){}return""}});e.default=function(t){return o.render(t)}},function(t,e){t.exports=require("remarkable")},function(t,e){t.exports=require("highlight.js")},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(0),i=(o.prototype.length=function(){return this.end-this.start},o.prototype.extract=function(t){return t.substr(this.start,this.length())},o);function o(){}var a=new function(){var t=this;this.delimiterMap=[{opener:"\\[",closer:"\\]",displayMode:!0},{opener:"\\(",closer:"\\)",displayMode:!1}],this.findOpeningDelimiter=function(e,r){var n,i,o,a=[],u=[];return t.delimiterMap.map((function(t){return u.push({options:t,pos:e.indexOf(t.opener,r)})})),u.map((function(t){return 0<=t.pos?a.push(t.pos):null})),0===a.length?null:(o=Math.min.apply(Math,a),i=function(){var t,e,r;for(r=[],t=0,e=u.length;t<e;t++)n=u[t],r.push(n.pos);return r}().indexOf(o),u[i])},this.getLatexBoundaries=function(t,e){var r,n,o,a;return o=new i,a=new i,r=e.options.closer,a.start=e.pos,o.start=e.pos+r.length,(n=t.substr(o.start).indexOf(r))<0?null:(o.end=o.start+n,a.end=o.end+r.length,{outer:a,inner:o})},this.findLatex=function(e){var r,n,i;for(i=0;null!=(n=t.findOpeningDelimiter(e,i++));)if(null!=(r=t.getLatexBoundaries(e,n))&&r.inner.extract(e).trim().length)return r.options=n.options,r;return null},this.extractLatex=function(t,e){var r,n;return n=t.substr(0,e.outer.start),r=t.substr(e.outer.end),{before:n,latex:e.inner.extract(t),after:r}},this.renderLatex=function(t,e){var r;try{r=n.renderToString(t,{displayMode:e})}catch(t){r='<div class="katex-error katex-'+(e=e?"block":"inline")+'-error">'+t.message+"</div>"}return r},this.render=function(e){var r,n,i,o;for(o="";;){if(null==(r=t.findLatex(e))){o+=e;break}n=t.extractLatex(e,r),i=t.renderLatex(n.latex,r.options.displayMode),o+=n.before+i,e=n.after}return o}};e.default=function(t){return a.render(t)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){var r,n;return r=t.replace(/(href|src)\s*=\s*(?:\"|\')?\s*([^\"\'\/]+)(?:[^\"\']*)(?=(\"|\'))?/g,(function(t){if(t.match(/"(http(s?)|ftp):\/\//))return t;var r=t.split('"');return r[1]?r[0]+'"'+e(r[1]):r[0]+'"'})),n=new Set,r.replace(/\<(h1|h2|h3)/g,(function(t,e,i,o){var a=r.substr(i+4),u=new RegExp("</"+e).exec(a);u&&(a=a.substr(0,u.index));for(var s=1,c=a.replace(/ /g,"-").toLowerCase().trim();n.has(c);)c=a.replace(/ /g,"-").toLowerCase().trim()+s,s++;return n.add(c),t+' id="'+c+'"'}))}},function(t,e,r){"use strict";var n=this&&this.__spreadArrays||function(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;var n=Array(t),i=0;for(e=0;e<r;e++)for(var o=arguments[e],a=0,u=o.length;a<u;a++,i++)n[i]=o[a];return n};Object.defineProperty(e,"__esModule",{value:!0}),e.citationsRender=e.symbolRender=void 0;var i=r(0),o=r(9);e.symbolRender=function(t,e){return t+(Object.keys(e).map((function(t){var r=e[t];return"\n<tr>\n<td>\n"+i.renderToString(t)+"\n</td>\n<td>\n"+r.type+"\n</td>\n<td>\n"+r.description+"\n</td>\n</tr>\n"})).reduce((function(t,e){return t+e}),'<table class="markademic-symbols">')+"</table>")},e.citationsRender=function(t,e){var r=[],i=[],a=new Set;return t=t.replace(/\[\^\w*\]/g,(function(t){var o=t.substr(2,t.length-3);if(o in e){var u="",s=e[o].author[0].name,c=/^([^,]*),/.exec(s);if(c)u=c[0].substr(c[0].length-1);else{var l=/ .*$/.exec(s);l&&(u=l[0].substr(1,l[0].length-1))}return 1<e[o].author.length&&(u+=" et al."),e[o].year&&(u+=" "+e[o].year),a.has(o)||(a.add(o),r=n(r,[o]),i[o]=u),'<a href="#ref_'+o+'">['+u+"]</a>"}return""})),0==r.length?t:t+(r.map((function(t){var r=e[t],n=r.title,a=void 0===n?"":n,u=r.author,s=void 0===u?[]:u,c=r.publisher,l=void 0===c?"":c,f=r.journal,d=void 0===f?"":f,h=r.year,p=void 0===h?0:h,g=r.link,v=void 0===g?[]:g,b='<span class="markademic-citename">['+i[t]+"]</span><br>",m=0<a.length?'<em><strong><span class="markademic-title">'+a+"</span></strong></em><br>":"",y=s.reduce((function(t,e,r){var n="";if(e.name){1<=r&&(r==s.length-1?n+=" and ":n+=", ");var i="";if(e.github?(n+='<img class="markademic-profile" src="'+e.github+'.png"> ',i=e.github):e.email&&(n+='<img class="markademic-profile" src="https://www.gravatar.com/avatar/'+o("MyEmailAddress@example.com ".trim().toLocaleLowerCase())+'"> ',i="mailto:"+e.email),e.website&&(i=e.website),0<i.length?n+='<a href="'+i+'">'+e.name+"</a>":n+=e.name,e.twitter){var a="",u="";try{new URL(e.twitter)&&((c=/\.com\//.exec(e.twitter))&&(u=e.twitter.slice(c.index+".com/".length)),a=e.twitter)}catch(t){var c;(c=/@/.exec(e.twitter))?u=e.twitter.slice(c.index+"@".length):0<e.twitter.length&&(u=e.twitter),a="https://twitter.com/"+u}n+=' (<a href="'+a+'">@'+u+"</a>)"}}return t+n}),"");0<y.length&&(y='<span class="markademic-authors">'+y+"</span><br>");var x="";0<l.length&&(x+=l),0<d.length&&(0<x.length&&(x+=", "),x+=d),0<x.length&&(x+=" "),0<p&&(x+=p),0<x.length&&(x='<span class="markademic-publisher">'+x+"</span><br>");var w="";return 0<v.length&&(w=v.reduce((function(t,e,r){var n=e.url,i=/(http|ftp|https):\/\/(www\.)?/.exec(n=n||"");i&&(n=n.slice(i[0].length));var o=/\//.exec(n);return o&&(n=n.slice(0,o.index)),t+(e.url?(1<=r?" ":"")+'<a href="'+e.url+'">'+(e.title?e.title:n)+"</a>":"")}),"")),'\n<tr>\n<td id="ref_'+t+'">\n'+b+"\n"+m+"\n"+y+"\n"+x+"\n"+w+"\n</td>\n</tr>\n"})).reduce((function(t,e){return t+e}),'<table class="markademic-citations">')+"</table>")}},function(t,e,r){var n,i,o,a,u;n=r(10),i=r(1).utf8,o=r(11),a=r(1).bin,(u=function(t,e){t.constructor==String?t=e&&"binary"===e.encoding?a.stringToBytes(t):i.stringToBytes(t):o(t)?t=Array.prototype.slice.call(t,0):Array.isArray(t)||t.constructor===Uint8Array||(t=t.toString());for(var r=n.bytesToWords(t),s=8*t.length,c=1732584193,l=-271733879,f=-1732584194,d=271733878,h=0;h<r.length;h++)r[h]=16711935&(r[h]<<8|r[h]>>>24)|4278255360&(r[h]<<24|r[h]>>>8);r[s>>>5]|=128<<s%32,r[14+(64+s>>>9<<4)]=s;var p=u._ff,g=u._gg,v=u._hh,b=u._ii;for(h=0;h<r.length;h+=16){var m=c,y=l,x=f,w=d;c=p(c,l,f,d,r[h+0],7,-680876936),d=p(d,c,l,f,r[h+1],12,-389564586),f=p(f,d,c,l,r[h+2],17,606105819),l=p(l,f,d,c,r[h+3],22,-1044525330),c=p(c,l,f,d,r[h+4],7,-176418897),d=p(d,c,l,f,r[h+5],12,1200080426),f=p(f,d,c,l,r[h+6],17,-1473231341),l=p(l,f,d,c,r[h+7],22,-45705983),c=p(c,l,f,d,r[h+8],7,1770035416),d=p(d,c,l,f,r[h+9],12,-1958414417),f=p(f,d,c,l,r[h+10],17,-42063),l=p(l,f,d,c,r[h+11],22,-1990404162),c=p(c,l,f,d,r[h+12],7,1804603682),d=p(d,c,l,f,r[h+13],12,-40341101),f=p(f,d,c,l,r[h+14],17,-1502002290),c=g(c,l=p(l,f,d,c,r[h+15],22,1236535329),f,d,r[h+1],5,-165796510),d=g(d,c,l,f,r[h+6],9,-1069501632),f=g(f,d,c,l,r[h+11],14,643717713),l=g(l,f,d,c,r[h+0],20,-373897302),c=g(c,l,f,d,r[h+5],5,-701558691),d=g(d,c,l,f,r[h+10],9,38016083),f=g(f,d,c,l,r[h+15],14,-660478335),l=g(l,f,d,c,r[h+4],20,-405537848),c=g(c,l,f,d,r[h+9],5,568446438),d=g(d,c,l,f,r[h+14],9,-1019803690),f=g(f,d,c,l,r[h+3],14,-187363961),l=g(l,f,d,c,r[h+8],20,1163531501),c=g(c,l,f,d,r[h+13],5,-1444681467),d=g(d,c,l,f,r[h+2],9,-51403784),f=g(f,d,c,l,r[h+7],14,1735328473),c=v(c,l=g(l,f,d,c,r[h+12],20,-1926607734),f,d,r[h+5],4,-378558),d=v(d,c,l,f,r[h+8],11,-2022574463),f=v(f,d,c,l,r[h+11],16,1839030562),l=v(l,f,d,c,r[h+14],23,-35309556),c=v(c,l,f,d,r[h+1],4,-1530992060),d=v(d,c,l,f,r[h+4],11,1272893353),f=v(f,d,c,l,r[h+7],16,-155497632),l=v(l,f,d,c,r[h+10],23,-1094730640),c=v(c,l,f,d,r[h+13],4,681279174),d=v(d,c,l,f,r[h+0],11,-358537222),f=v(f,d,c,l,r[h+3],16,-722521979),l=v(l,f,d,c,r[h+6],23,76029189),c=v(c,l,f,d,r[h+9],4,-640364487),d=v(d,c,l,f,r[h+12],11,-421815835),f=v(f,d,c,l,r[h+15],16,530742520),c=b(c,l=v(l,f,d,c,r[h+2],23,-995338651),f,d,r[h+0],6,-198630844),d=b(d,c,l,f,r[h+7],10,1126891415),f=b(f,d,c,l,r[h+14],15,-1416354905),l=b(l,f,d,c,r[h+5],21,-57434055),c=b(c,l,f,d,r[h+12],6,1700485571),d=b(d,c,l,f,r[h+3],10,-1894986606),f=b(f,d,c,l,r[h+10],15,-1051523),l=b(l,f,d,c,r[h+1],21,-2054922799),c=b(c,l,f,d,r[h+8],6,1873313359),d=b(d,c,l,f,r[h+15],10,-30611744),f=b(f,d,c,l,r[h+6],15,-1560198380),l=b(l,f,d,c,r[h+13],21,1309151649),c=b(c,l,f,d,r[h+4],6,-145523070),d=b(d,c,l,f,r[h+11],10,-1120210379),f=b(f,d,c,l,r[h+2],15,718787259),l=b(l,f,d,c,r[h+9],21,-343485551),c=c+m>>>0,l=l+y>>>0,f=f+x>>>0,d=d+w>>>0}return n.endian([c,l,f,d])})._ff=function(t,e,r,n,i,o,a){var u=t+(e&r|~e&n)+(i>>>0)+a;return(u<<o|u>>>32-o)+e},u._gg=function(t,e,r,n,i,o,a){var u=t+(e&n|r&~n)+(i>>>0)+a;return(u<<o|u>>>32-o)+e},u._hh=function(t,e,r,n,i,o,a){var u=t+(e^r^n)+(i>>>0)+a;return(u<<o|u>>>32-o)+e},u._ii=function(t,e,r,n,i,o,a){var u=t+(r^(e|~n))+(i>>>0)+a;return(u<<o|u>>>32-o)+e},u._blocksize=16,u._digestsize=16,t.exports=function(t,e){if(null==t)throw new Error("Illegal argument "+t);var r=n.wordsToBytes(u(t,e));return e&&e.asBytes?r:e&&e.asString?a.bytesToString(r):n.bytesToHex(r)}},function(t,e){var r,n;r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(t,e){return t<<e|t>>>32-e},rotr:function(t,e){return t<<32-e|t>>>e},endian:function(t){if(t.constructor==Number)return 16711935&n.rotl(t,8)|4278255360&n.rotl(t,24);for(var e=0;e<t.length;e++)t[e]=n.endian(t[e]);return t},randomBytes:function(t){for(var e=[];0<t;t--)e.push(Math.floor(256*Math.random()));return e},bytesToWords:function(t){for(var e=[],r=0,n=0;r<t.length;r++,n+=8)e[n>>>5]|=t[r]<<24-n%32;return e},wordsToBytes:function(t){for(var e=[],r=0;r<32*t.length;r+=8)e.push(t[r>>>5]>>>24-r%32&255);return e},bytesToHex:function(t){for(var e=[],r=0;r<t.length;r++)e.push((t[r]>>>4).toString(16)),e.push((15&t[r]).toString(16));return e.join("")},hexToBytes:function(t){for(var e=[],r=0;r<t.length;r+=2)e.push(parseInt(t.substr(r,2),16));return e},bytesToBase64:function(t){for(var e=[],n=0;n<t.length;n+=3)for(var i=t[n]<<16|t[n+1]<<8|t[n+2],o=0;o<4;o++)8*n+6*o<=8*t.length?e.push(r.charAt(i>>>6*(3-o)&63)):e.push("=");return e.join("")},base64ToBytes:function(t){t=t.replace(/[^A-Z0-9+\/]/gi,"");for(var e=[],n=0,i=0;n<t.length;i=++n%4)0!=i&&e.push((r.indexOf(t.charAt(n-1))&Math.pow(2,-2*i+8)-1)<<2*i|r.indexOf(t.charAt(n))>>>6-2*i);return e}},t.exports=n},function(t,e){function r(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}
/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/t.exports=function(t){return null!=t&&(r(t)||"function"==typeof(e=t).readFloatLE&&"function"==typeof e.slice&&r(e.slice(0,0))||!!t._isBuffer);var e}}]);
/*! For license information please see markademic.js.LICENSE.txt */
(()=>{var t={943:t=>{var e={utf8:{stringToBytes:function(t){return e.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(e.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var e=[],r=0;r<t.length;r++)e.push(255&t.charCodeAt(r));return e},bytesToString:function(t){for(var e=[],r=0;r<t.length;r++)e.push(String.fromCharCode(t[r]));return e.join("")}}};t.exports=e},677:t=>{var e,r;e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(t,e){return t<<e|t>>>32-e},rotr:function(t,e){return t<<32-e|t>>>e},endian:function(t){if(t.constructor==Number)return 16711935&r.rotl(t,8)|4278255360&r.rotl(t,24);for(var e=0;e<t.length;e++)t[e]=r.endian(t[e]);return t},randomBytes:function(t){for(var e=[];t>0;t--)e.push(Math.floor(256*Math.random()));return e},bytesToWords:function(t){for(var e=[],r=0,n=0;r<t.length;r++,n+=8)e[n>>>5]|=t[r]<<24-n%32;return e},wordsToBytes:function(t){for(var e=[],r=0;r<32*t.length;r+=8)e.push(t[r>>>5]>>>24-r%32&255);return e},bytesToHex:function(t){for(var e=[],r=0;r<t.length;r++)e.push((t[r]>>>4).toString(16)),e.push((15&t[r]).toString(16));return e.join("")},hexToBytes:function(t){for(var e=[],r=0;r<t.length;r+=2)e.push(parseInt(t.substr(r,2),16));return e},bytesToBase64:function(t){for(var r=[],n=0;n<t.length;n+=3)for(var i=t[n]<<16|t[n+1]<<8|t[n+2],o=0;o<4;o++)8*n+6*o<=8*t.length?r.push(e.charAt(i>>>6*(3-o)&63)):r.push("=");return r.join("")},base64ToBytes:function(t){t=t.replace(/[^A-Z0-9+\/]/gi,"");for(var r=[],n=0,i=0;n<t.length;i=++n%4)0!=i&&r.push((e.indexOf(t.charAt(n-1))&Math.pow(2,-2*i+8)-1)<<2*i|e.indexOf(t.charAt(n))>>>6-2*i);return r}},t.exports=r},809:t=>{function e(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}t.exports=function(t){return null!=t&&(e(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&e(t.slice(0,0))}(t)||!!t._isBuffer)}},586:(t,e,r)=>{var n,i,o,a,u;n=r(677),i=r(943).utf8,o=r(809),a=r(943).bin,(u=function(t,e){t.constructor==String?t=e&&"binary"===e.encoding?a.stringToBytes(t):i.stringToBytes(t):o(t)?t=Array.prototype.slice.call(t,0):Array.isArray(t)||t.constructor===Uint8Array||(t=t.toString());for(var r=n.bytesToWords(t),s=8*t.length,c=1732584193,l=-271733879,f=-1732584194,d=271733878,h=0;h<r.length;h++)r[h]=16711935&(r[h]<<8|r[h]>>>24)|4278255360&(r[h]<<24|r[h]>>>8);r[s>>>5]|=128<<s%32,r[14+(s+64>>>9<<4)]=s;var p=u._ff,g=u._gg,v=u._hh,b=u._ii;for(h=0;h<r.length;h+=16){var m=c,y=l,x=f,_=d;c=p(c,l,f,d,r[h+0],7,-680876936),d=p(d,c,l,f,r[h+1],12,-389564586),f=p(f,d,c,l,r[h+2],17,606105819),l=p(l,f,d,c,r[h+3],22,-1044525330),c=p(c,l,f,d,r[h+4],7,-176418897),d=p(d,c,l,f,r[h+5],12,1200080426),f=p(f,d,c,l,r[h+6],17,-1473231341),l=p(l,f,d,c,r[h+7],22,-45705983),c=p(c,l,f,d,r[h+8],7,1770035416),d=p(d,c,l,f,r[h+9],12,-1958414417),f=p(f,d,c,l,r[h+10],17,-42063),l=p(l,f,d,c,r[h+11],22,-1990404162),c=p(c,l,f,d,r[h+12],7,1804603682),d=p(d,c,l,f,r[h+13],12,-40341101),f=p(f,d,c,l,r[h+14],17,-1502002290),c=g(c,l=p(l,f,d,c,r[h+15],22,1236535329),f,d,r[h+1],5,-165796510),d=g(d,c,l,f,r[h+6],9,-1069501632),f=g(f,d,c,l,r[h+11],14,643717713),l=g(l,f,d,c,r[h+0],20,-373897302),c=g(c,l,f,d,r[h+5],5,-701558691),d=g(d,c,l,f,r[h+10],9,38016083),f=g(f,d,c,l,r[h+15],14,-660478335),l=g(l,f,d,c,r[h+4],20,-405537848),c=g(c,l,f,d,r[h+9],5,568446438),d=g(d,c,l,f,r[h+14],9,-1019803690),f=g(f,d,c,l,r[h+3],14,-187363961),l=g(l,f,d,c,r[h+8],20,1163531501),c=g(c,l,f,d,r[h+13],5,-1444681467),d=g(d,c,l,f,r[h+2],9,-51403784),f=g(f,d,c,l,r[h+7],14,1735328473),c=v(c,l=g(l,f,d,c,r[h+12],20,-1926607734),f,d,r[h+5],4,-378558),d=v(d,c,l,f,r[h+8],11,-2022574463),f=v(f,d,c,l,r[h+11],16,1839030562),l=v(l,f,d,c,r[h+14],23,-35309556),c=v(c,l,f,d,r[h+1],4,-1530992060),d=v(d,c,l,f,r[h+4],11,1272893353),f=v(f,d,c,l,r[h+7],16,-155497632),l=v(l,f,d,c,r[h+10],23,-1094730640),c=v(c,l,f,d,r[h+13],4,681279174),d=v(d,c,l,f,r[h+0],11,-358537222),f=v(f,d,c,l,r[h+3],16,-722521979),l=v(l,f,d,c,r[h+6],23,76029189),c=v(c,l,f,d,r[h+9],4,-640364487),d=v(d,c,l,f,r[h+12],11,-421815835),f=v(f,d,c,l,r[h+15],16,530742520),c=b(c,l=v(l,f,d,c,r[h+2],23,-995338651),f,d,r[h+0],6,-198630844),d=b(d,c,l,f,r[h+7],10,1126891415),f=b(f,d,c,l,r[h+14],15,-1416354905),l=b(l,f,d,c,r[h+5],21,-57434055),c=b(c,l,f,d,r[h+12],6,1700485571),d=b(d,c,l,f,r[h+3],10,-1894986606),f=b(f,d,c,l,r[h+10],15,-1051523),l=b(l,f,d,c,r[h+1],21,-2054922799),c=b(c,l,f,d,r[h+8],6,1873313359),d=b(d,c,l,f,r[h+15],10,-30611744),f=b(f,d,c,l,r[h+6],15,-1560198380),l=b(l,f,d,c,r[h+13],21,1309151649),c=b(c,l,f,d,r[h+4],6,-145523070),d=b(d,c,l,f,r[h+11],10,-1120210379),f=b(f,d,c,l,r[h+2],15,718787259),l=b(l,f,d,c,r[h+9],21,-343485551),c=c+m>>>0,l=l+y>>>0,f=f+x>>>0,d=d+_>>>0}return n.endian([c,l,f,d])})._ff=function(t,e,r,n,i,o,a){var u=t+(e&r|~e&n)+(i>>>0)+a;return(u<<o|u>>>32-o)+e},u._gg=function(t,e,r,n,i,o,a){var u=t+(e&n|r&~n)+(i>>>0)+a;return(u<<o|u>>>32-o)+e},u._hh=function(t,e,r,n,i,o,a){var u=t+(e^r^n)+(i>>>0)+a;return(u<<o|u>>>32-o)+e},u._ii=function(t,e,r,n,i,o,a){var u=t+(r^(e|~n))+(i>>>0)+a;return(u<<o|u>>>32-o)+e},u._blocksize=16,u._digestsize=16,t.exports=function(t,e){if(null==t)throw new Error("Illegal argument "+t);var r=n.wordsToBytes(u(t,e));return e&&e.asBytes?r:e&&e.asString?a.bytesToString(r):n.bytesToHex(r)}},2:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return i(e,t),e},a=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.citationsRender=e.symbolRender=void 0;var u=o(r(104)),s=o(r(586));e.symbolRender=function(t,e){return t+(Object.keys(e).map((function(t){var r=e[t];return"\n<tr>\n<td>\n"+u.renderToString(t)+"\n</td>\n<td>\n"+r.type+"\n</td>\n<td>\n"+r.description+"\n</td>\n</tr>\n"})).reduce((function(t,e){return t+e}),'<table class="markademic-symbols">')+"</table>")},e.citationsRender=function(t,e){var r=[],n=[],i=new Set;return t=t.replace(/\[\^\w*\]/g,(function(t){var o=t.substr(2,t.length-3);if(o in e){var u="",s=e[o].author[0].name,c=/^([^,]*),/.exec(s);if(c)u=c[0].substr(c[0].length-1);else{var l=/ .*$/.exec(s);l&&(u=l[0].substr(1,l[0].length-1))}return e[o].author.length>1&&(u+=" et al."),e[o].year&&(u+=" "+e[o].year),i.has(o)||(i.add(o),r=a(a([],r,!0),[o],!1),n[o]=u),'<a href="#ref_'+o+'">['+u+"]</a>"}return""})),0==r.length?t:t+(r.map((function(t){var r=e[t],i=r.title,o=void 0===i?"":i,a=r.author,u=void 0===a?[]:a,c=r.publisher,l=void 0===c?"":c,f=r.journal,d=void 0===f?"":f,h=r.year,p=void 0===h?0:h,g=r.link,v=void 0===g?[]:g,b='<span class="markademic-citename">['+n[t]+"]</span><br>",m=o.length>0?'<em><strong><span class="markademic-title">'+o+"</span></strong></em><br>":"",y=u.reduce((function(t,e,r){var n="";if(e.name){r>=1&&(r==u.length-1?n+=" and ":n+=", ");var i="";if(e.github?(n+='<img class="markademic-profile" src="'+e.github+'.png"> ',i=e.github):e.email&&(n+='<img class="markademic-profile" src="https://www.gravatar.com/avatar/'+s("MyEmailAddress@example.com ".trim().toLocaleLowerCase())+'"> ',i="mailto:"+e.email),e.website&&(i=e.website),i.length>0?n+='<a href="'+i+'">'+e.name+"</a>":n+=e.name,e.twitter){var o="",a="";try{new URL(e.twitter)&&((c=/\.com\//.exec(e.twitter))&&(a=e.twitter.slice(c.index+".com/".length)),o=e.twitter)}catch(t){var c;(c=/@/.exec(e.twitter))?a=e.twitter.slice(c.index+"@".length):e.twitter.length>0&&(a=e.twitter),o="https://twitter.com/"+a}n+=' (<a href="'+o+'">@'+a+"</a>)"}}return t+n}),"");y.length>0&&(y='<span class="markademic-authors">'+y+"</span><br>");var x="";l.length>0&&(x+=l),d.length>0&&(x.length>0&&(x+=", "),x+=d),x.length>0&&(x+=" "),p>0&&(x+=p),x.length>0&&(x='<span class="markademic-publisher">'+x+"</span><br>");var _="";return v.length>0&&(_=v.reduce((function(t,e,r){var n=e.url;n||(n="");var i=/(http|ftp|https):\/\/(www\.)?/.exec(n);i&&(n=n.slice(i[0].length));var o=/\//.exec(n);return o&&(n=n.slice(0,o.index)),t+(e.url?(r>=1?" ":"")+'<a href="'+e.url+'">'+(e.title?e.title:n)+"</a>":"")}),"")),'\n<tr>\n<td id="ref_'+t+'">\n'+b+"\n"+m+"\n"+y+"\n"+x+"\n"+_+"\n</td>\n</tr>\n"})).reduce((function(t,e){return t+e}),'<table class="markademic-citations">')+"</table>")}},94:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return i(e,t),e};Object.defineProperty(e,"__esModule",{value:!0});var a=o(r(104)),u=function(){function t(){}return t.prototype.length=function(){return this.end-this.start},t.prototype.extract=function(t){return t.substr(this.start,this.length())},t}(),s=new function(){var t=this;this.delimiterMap=[{opener:"\\[",closer:"\\]",displayMode:!0},{opener:"\\(",closer:"\\)",displayMode:!1}],this.findOpeningDelimiter=function(e,r){var n,i,o,a=[],u=[];return t.delimiterMap.map((function(t){return u.push({options:t,pos:e.indexOf(t.opener,r)})})),u.map((function(t){return t.pos>=0?a.push(t.pos):null})),0===a.length?null:(o=Math.min.apply(Math,a),i=function(){var t,e,r;for(r=[],t=0,e=u.length;t<e;t++)n=u[t],r.push(n.pos);return r}().indexOf(o),u[i])},this.getLatexBoundaries=function(t,e){var r,n,i,o;return i=new u,o=new u,r=e.options.closer,o.start=e.pos,i.start=e.pos+r.length,(n=t.substr(i.start).indexOf(r))<0?null:(i.end=i.start+n,o.end=i.end+r.length,{outer:o,inner:i})},this.findLatex=function(e){var r,n,i;for(i=0;null!=(n=t.findOpeningDelimiter(e,i++));)if(null!=(r=t.getLatexBoundaries(e,n))?r.inner.extract(e).trim().length:void 0)return r.options=n.options,r;return null},this.extractLatex=function(t,e){var r,n;return n=t.substr(0,e.outer.start),r=t.substr(e.outer.end),{before:n,latex:e.inner.extract(t),after:r}},this.renderLatex=function(t,e){var r,n,i;try{i=a.renderToString(t,{displayMode:e})}catch(n){r=n,i='<div class="katex-error katex-'+(e=e?"block":"inline")+'-error">'+r.message+"</div>"}return i},this.render=function(e){var r,n,i,o;for(o="";;){if(null==(r=t.findLatex(e))){o+=e;break}n=t.extractLatex(e,r),i=t.renderLatex(n.latex,r.options.displayMode),o+=n.before+i,e=n.after}return o}};e.default=function(t){return s.render(t)}},341:function(t,e,r){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=n(r(352)),o=n(r(94)),a=n(r(176)),u=r(2);e.default=function(t){var e=(0,o.default)(t.input);return e=void 0!==e?(0,i.default)(e):(0,i.default)(t.input),t.rerouteLinks&&(e=(0,a.default)(e,t.rerouteLinks)),t.symbols&&(e=(0,u.symbolRender)(e,t.symbols)),t.citations&&(e=(0,u.citationsRender)(e,t.citations)),e}},352:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return i(e,t),e};Object.defineProperty(e,"__esModule",{value:!0});var a=o(r(508)),u=o(r(404)),s=new a.Remarkable({html:!0,highlight:function(t,e){if(e&&u.getLanguage(e))try{return u.highlight(e,t).value}catch(t){}try{return u.highlightAuto(t).value}catch(t){}return""}});e.default=function(t){return s.render(t)}},176:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){return function(t){var e=new Set;return t.replace(/\<(h1|h2|h3)/g,(function(r,n,i,o){var a=t.substr(i+4),u=new RegExp("</"+n).exec(a);u&&(a=a.substr(0,u.index));for(var s=1,c=a.replace(/ /g,"-").toLowerCase().trim();e.has(c);)c=a.replace(/ /g,"-").toLowerCase().trim()+s,s++;return e.add(c),r+' id="'+c+'"'}))}(t.replace(/(href|src)\s*=\s*(?:\"|\')?\s*([^\"\'\/]+)(?:[^\"\']*)(?=(\"|\'))?/g,(function(t){if(t.match(/"(http(s?)|ftp):\/\//))return t;var r=t.split('"');return r[1]?r[0]+'"'+e(r[1]):r[0]+'"'})))}},404:t=>{"use strict";t.exports=require("highlight.js")},104:t=>{"use strict";t.exports=require("katex")},508:t=>{"use strict";t.exports=require("remarkable")}},e={},r=function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}(341);module.exports.markademic=r})();
MIT License
Copyright (c) 2020 HyperFuse
Copyright (c) 2021 plus1tv

@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy

{
"name": "markademic",
"version": "0.14.1",
"version": "0.14.3",
"description": "๐Ÿซ A tool for rendering academically flavored markdown.",

@@ -8,5 +8,4 @@ "main": "dist/markademic.js",

"scripts": {
"build": "webpack --config webpack.prod.js",
"pretest": "tsc",
"test": "ava tests/markademic.spec.js",
"build": "cross-env NODE_ENV=production ts-node webpack.ts",
"test": "ava tests/markademic.spec.ts",
"coverage": "nyc npm test && nyc report --reporter=lcov && codecov",

@@ -18,3 +17,3 @@ "test:watch": "ava --converage --watch",

"type": "git",
"url": "git+https://github.com/hyperfuse/markademic.git"
"url": "git+https://github.com/plus1tv/markademic.git"
},

@@ -34,23 +33,30 @@ "keywords": [

"bugs": {
"url": "https://github.com/hyperfuse/markademic/issues"
"url": "https://github.com/plus1tv/markademic/issues"
},
"homepage": "https://github.com/hyperfuse/markademic#readme",
"homepage": "https://github.com/plus1tv/markademic#readme",
"ava": {
"extensions": [
"ts"
],
"require": [
"ts-node/register/transpile-only"
]
},
"devDependencies": {
"@types/katex": "0.11.x",
"@types/node": "^14.14.x",
"ava": "^3.13.x",
"@types/node": "^16.10.1",
"ava": "^3.15.x",
"clean-webpack-plugin": "^4.0.x",
"codecov": "^3.8.x",
"coveralls": "^3.1.x",
"cross-env": "^7.0.3",
"nyc": "^15.1.x",
"ts-loader": "^8.0.x",
"typescript": "^4.1.x",
"clean-webpack-plugin": "^3.0.x",
"uglifyjs-webpack-plugin": "^2.2.x",
"webpack": "^4.41.x",
"webpack-command": "^0.5.x",
"webpack-merge": "^4.2.x"
"ts-loader": "^9.2.x",
"ts-node": "^10.2.1",
"typescript": "^4.4.x",
"webpack": "^5.54.x"
},
"dependencies": {
"highlight.js": "^10.4.0",
"katex": "^0.12.x",
"highlight.js": "^11.2.0",
"katex": "^0.13.x",
"md5": "^2.3.0",

@@ -57,0 +63,0 @@ "remarkable": "^2.0.1"

@@ -84,3 +84,3 @@ # Markademic

Similar to Latex References, to place references, simply write `[^yourrefname]`, and this will be matched with your BibJSON object's key of the same name (minus the `^`). (This is directly inspired by the same feature on [stackedit.io](https://stackedit.io)).
Similar to Latex References, to place references, simply write `[^yourrefname]`, and this will be matched with your BibJSON object's key of the same name (minus the `^`). (This is directly inspired by the same feature on [stackedit.io](https://stackedit.io)). This uses the [BibJSON specification](https://github.com/plus1tv/bibtex-bibjson), which is just a JSON version of common LaTeX bibliographies.

@@ -191,12 +191,12 @@ On the bottom of your markdown file there will be some automatically generated references that look like this:

[license-url]: https://opensource.org/licenses/MIT
[david-url]: https://david-dm.org/hyperfuse/markademic
[david-img]: https://david-dm.org/hyperfuse/markademic.svg?style=flat-square
[david-dev-url]: https://david-dm.org/hyperfuse/markademic#info=devDependencies
[david-dev-img]: https://david-dm.org/hyperfuse/markademic/dev-status.svg?style=flat-square
[travis-img]: https://img.shields.io/travis/hyperfuse/markademic.svg?style=flat-square
[travis-url]:https://travis-ci.org/hyperfuse/markademic
[codecov-img]:https://img.shields.io/codecov/c/github/hyperfuse/markademic.svg?style=flat-square
[codecov-url]: https://codecov.io/gh/hyperfuse/markademic
[david-url]: https://david-dm.org/plus1tv/markademic
[david-img]: https://david-dm.org/plus1tv/markademic.svg?style=flat-square
[david-dev-url]: https://david-dm.org/plus1tv/markademic#info=devDependencies
[david-dev-img]: https://david-dm.org/plus1tv/markademic/dev-status.svg?style=flat-square
[travis-img]: https://img.shields.io/travis/plus1tv/markademic.svg?style=flat-square
[travis-url]:https://www.travis-ci.com/github/plus1tv/markademic
[codecov-img]:https://img.shields.io/codecov/c/github/plus1tv/markademic.svg?style=flat-square
[codecov-url]: https://codecov.io/gh/plus1tv/markademic
[npm-img]: https://img.shields.io/npm/v/markademic.svg?style=flat-square
[npm-url]: http://npm.im/markademic
[npm-download-img]: https://img.shields.io/npm/dm/markademic.svg?style=flat-square
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