All Downloads are FREE. Search and download functionalities are using the official Maven repository.

asset.~act.js.markdown-it-footnote.min.js Maven / Gradle / Ivy

There is a newer version: 1.9.2
Show newest version
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var o;o="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,o.markdownitFootnote=e()}}(function(){return function e(o,t,n){function r(f,i){if(!t[f]){if(!o[f]){var l="function"==typeof require&&require;if(!i&&l)return l(f,!0);if(s)return s(f,!0);var a=new Error("Cannot find module '"+f+"'");throw a.code="MODULE_NOT_FOUND",a}var u=t[f]={exports:{}};o[f][0].call(u.exports,function(e){var t=o[f][1][e];return r(t?t:e)},u,u.exports,e,o,t,n)}return t[f].exports}for(var s="function"==typeof require&&require,f=0;f0&&(n+=":"+e[o].meta.subId),'['+t+"]"}function r(e,o,t){return(t.xhtmlOut?'
\n':'
\n')+'
\n
    \n'}function s(){return"
\n
\n"}function f(e,o){return'
  • '}function i(){return"
  • \n"}function l(e,o){var t=Number(e[o].meta.id+1).toString(),n="fnref"+t;return e[o].meta.subId>0&&(n+=":"+e[o].meta.subId),' '}o.exports=function(e){function o(e,o,t,n){var r,s,f,i,l,a,u=e.bMarks[o]+e.tShift[o],c=e.eMarks[o];if(u+4>c)return!1;if(91!==e.src.charCodeAt(u))return!1;if(94!==e.src.charCodeAt(u+1))return!1;for(i=u+2;i=c||58!==e.src.charCodeAt(++i))&&(!!n||(i++,e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.refs||(e.env.footnotes.refs={}),l=e.src.slice(u+2,i-2),e.env.footnotes.refs[":"+l]=-1,a=new e.Token("footnote_reference_open","",1),a.meta={label:l},a.level=e.level++,e.tokens.push(a),r=e.bMarks[o],s=e.tShift[o],f=e.parentType,e.tShift[o]=e.skipSpaces(i)-i,e.bMarks[o]=i,e.blkIndent+=4,e.parentType="footnote",e.tShift[o]=i)&&(94===e.src.charCodeAt(l)&&(91===e.src.charCodeAt(l+1)&&(t=l+2,!((n=c(e,l+1))<0)&&(o||(e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.list||(e.env.footnotes.list=[]),r=e.env.footnotes.list.length,e.pos=t,e.posMax=n,f=e.push("footnote_ref","",0),f.meta={id:r},s=e.tokens.length,e.md.inline.tokenize(e),e.env.footnotes.list[r]={tokens:e.tokens.splice(s)}),e.pos=n+1,e.posMax=i,!0))))}function a(e,o){var t,n,r,s,f,i=e.posMax,l=e.pos;if(l+3>i)return!1;if(!e.env.footnotes||!e.env.footnotes.refs)return!1;if(91!==e.src.charCodeAt(l))return!1;if(94!==e.src.charCodeAt(l+1))return!1;for(n=l+2;n=i)&&(n++,t=e.src.slice(l+2,n-1),void 0!==e.env.footnotes.refs[":"+t]&&(o||(e.env.footnotes.list||(e.env.footnotes.list=[]),e.env.footnotes.refs[":"+t]<0?(r=e.env.footnotes.list.length,e.env.footnotes.list[r]={label:t,count:0},e.env.footnotes.refs[":"+t]=r):r=e.env.footnotes.refs[":"+t],s=e.env.footnotes.list[r].count,e.env.footnotes.list[r].count++,f=e.push("footnote_ref","",0),f.meta={id:r,subId:s}),e.pos=n,e.posMax=i,!0)))}function u(e){var o,t,n,r,s,f,i,l,a,u,c=!1,p={};if(e.env.footnotes&&(e.tokens=e.tokens.filter(function(e){return"footnote_reference_open"===e.type?(c=!0,a=[],u=e.meta.label,!1):"footnote_reference_close"===e.type?(c=!1,p[":"+u]=a,!1):(c&&a.push(e),!c)}),e.env.footnotes.list)){for(f=e.env.footnotes.list,i=new e.Token("footnote_block_open","",1),e.tokens.push(i),o=0,t=f.length;o0?f[o].count:1,n=0;n




    © 2015 - 2024 Weber Informatics LLC | Privacy Policy