budget-wiki/docs/assets/js/docsify-footnotes.min.js
2025-10-09 15:40:15 +08:00

1 line
1.3 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(function(){var n=function(n,o){n.beforeEach(function(r){r=r.replaceAll("\r\n","\n");const n=/(^\[\^.+?\]:.+?(?=(\n\n|\n$|\n\[\^.+?\]:|$(?!\n))))|(\^\[.+?\])/gms;const o=r.match(/```.*?```/gms);if(o){o.forEach(function(n,o){r=r.replace(n,"```"+o+"```")})}if(n.test(r)){const t=r.match(n);const c=[];let f=1;t.forEach(function(n){if(/\^\[.*?\]/s.test(n)){r=r.replace(n,`<sup class="footnote-symbol" id="ft-${f}">[\[${f}\]](#ftref-${f})</sup>`);c.push(`${f}. ${n.match(/\[(.*)\]/s)[1].trim().replaceAll("\n","<br />")} <stronge id="ftref-${f}">[](#ft-${f})</stronge>\n`);f++}else{const s=n.split(/(?<=\]):/);const o=new RegExp("\\[\\^"+s[0].replace(/[\[\^\]]/g,"")+"\\](?!:)","g");r=r.replace(n,"");const t=r.match(o);if(t){const e=[];t.forEach(function(n,o){const t=o>0?"-"+o:"";const c=$props.hideSubAnchor?f:f+t;r=r.replace(s[0],`<sup class="footnote-symbol" id="ft-${f+t}">[\[${c}\]](#ftref-${f+t})</sup>`);e.push(`<stronge id="ftref-${f+t}">[](#ft-${f+t})</stronge>`)});c.push(`${f}. ${s[1].trim().replaceAll("\n","<br />")} ${e.join(" ")}\n`);f++}}});r+=`\n\n---\n ${c.join("")}`}if(o){o.forEach(function(n,o){r=r.replace("```"+o+"```",n)})}return r})};$docsify=$docsify||{};$props=$docsify.docsifyFootnote||{};$docsify.plugins=[].concat($docsify.plugins||[],n)})();