mirror of
https://github.com/hakimel/reveal.js.git
synced 2025-09-02 11:12:47 +02:00
vite theme build
This commit is contained in:
2
dist/plugin/markdown.js
vendored
2
dist/plugin/markdown.js
vendored
@@ -1,4 +1,4 @@
|
||||
(function(E,z){typeof exports=="object"&&typeof module<"u"?module.exports=z():typeof define=="function"&&define.amd?define(z):(E=typeof globalThis<"u"?globalThis:E||self,E.RevealMarkdown=z())})(this,function(){"use strict";var Te=Object.defineProperty;var Re=(E,z,C)=>z in E?Te(E,z,{enumerable:!0,configurable:!0,writable:!0,value:C}):E[z]=C;var te=(E,z,C)=>(Re(E,typeof z!="symbol"?z+"":z,C),C);function E(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let z=E();function C(o){z=o}const Z=/[&<>"']/,ne=new RegExp(Z.source,"g"),H=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,ie=new RegExp(H.source,"g"),se={"&":"&","<":"<",">":">",'"':""","'":"'"},j=o=>se[o];function A(o,n){if(n){if(Z.test(o))return o.replace(ne,j)}else if(H.test(o))return o.replace(ie,j);return o}const re=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function F(o){return o.replace(re,(n,t)=>(t=t.toLowerCase(),t==="colon"?":":t.charAt(0)==="#"?t.charAt(1)==="x"?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const le=/(^|[^\[])\^/g;function $(o,n){o=typeof o=="string"?o:o.source,n=n||"";const t={replace:(e,i)=>(i=i.source||i,i=i.replace(le,"$1"),o=o.replace(e,i),t),getRegex:()=>new RegExp(o,n)};return t}const ae=/[^\w:]/g,oe=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Q(o,n,t){if(o){let e;try{e=decodeURIComponent(F(t)).replace(ae,"").toLowerCase()}catch{return null}if(e.indexOf("javascript:")===0||e.indexOf("vbscript:")===0||e.indexOf("data:")===0)return null}n&&!oe.test(t)&&(t=pe(n,t));try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}const M={},ce=/^[^:]+:\/*[^/]*$/,he=/^([^:]+:)[\s\S]*$/,ue=/^([^:]+:\/*[^/]*)[\s\S]*$/;function pe(o,n){M[" "+o]||(ce.test(o)?M[" "+o]=o+"/":M[" "+o]=D(o,"/",!0)),o=M[" "+o];const t=o.indexOf(":")===-1;return n.substring(0,2)==="//"?t?n:o.replace(he,"$1")+n:n.charAt(0)==="/"?t?n:o.replace(ue,"$1")+n:o+n}const P={exec:function(){}};function V(o,n){const t=o.replace(/\|/g,(s,l,a)=>{let h=!1,w=l;for(;--w>=0&&a[w]==="\\";)h=!h;return h?"|":" |"}),e=t.split(/ \|/);let i=0;if(e[0].trim()||e.shift(),e.length>0&&!e[e.length-1].trim()&&e.pop(),e.length>n)e.splice(n);else for(;e.length<n;)e.push("");for(;i<e.length;i++)e[i]=e[i].trim().replace(/\\\|/g,"|");return e}function D(o,n,t){const e=o.length;if(e===0)return"";let i=0;for(;i<e;){const s=o.charAt(e-i-1);if(s===n&&!t)i++;else if(s!==n&&t)i++;else break}return o.slice(0,e-i)}function fe(o,n){if(o.indexOf(n[1])===-1)return-1;const t=o.length;let e=0,i=0;for(;i<t;i++)if(o[i]==="\\")i++;else if(o[i]===n[0])e++;else if(o[i]===n[1]&&(e--,e<0))return i;return-1}function ge(o){o&&o.sanitize&&!o.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function X(o,n){if(n<1)return"";let t="";for(;n>1;)n&1&&(t+=o),n>>=1,o+=o;return t+o}function G(o,n,t,e){const i=n.href,s=n.title?A(n.title):null,l=o[1].replace(/\\([\[\]])/g,"$1");if(o[0].charAt(0)!=="!"){e.state.inLink=!0;const a={type:"link",raw:t,href:i,title:s,text:l,tokens:e.inlineTokens(l)};return e.state.inLink=!1,a}return{type:"image",raw:t,href:i,title:s,text:A(l)}}function de(o,n){const t=o.match(/^(\s+)(?:```)/);if(t===null)return n;const e=t[1];return n.split(`
|
||||
(function(E,z){typeof exports=="object"&&typeof module<"u"?module.exports=z():typeof define=="function"&&define.amd?define(z):(E=typeof globalThis<"u"?globalThis:E||self,E.RevealMarkdown=z())})(this,function(){"use strict";var Te=Object.defineProperty;var Re=(E,z,C)=>z in E?Te(E,z,{enumerable:!0,configurable:!0,writable:!0,value:C}):E[z]=C;var te=(E,z,C)=>Re(E,typeof z!="symbol"?z+"":z,C);function E(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let z=E();function C(o){z=o}const Z=/[&<>"']/,ne=new RegExp(Z.source,"g"),H=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,ie=new RegExp(H.source,"g"),se={"&":"&","<":"<",">":">",'"':""","'":"'"},j=o=>se[o];function A(o,n){if(n){if(Z.test(o))return o.replace(ne,j)}else if(H.test(o))return o.replace(ie,j);return o}const re=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function F(o){return o.replace(re,(n,t)=>(t=t.toLowerCase(),t==="colon"?":":t.charAt(0)==="#"?t.charAt(1)==="x"?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const le=/(^|[^\[])\^/g;function $(o,n){o=typeof o=="string"?o:o.source,n=n||"";const t={replace:(e,i)=>(i=i.source||i,i=i.replace(le,"$1"),o=o.replace(e,i),t),getRegex:()=>new RegExp(o,n)};return t}const ae=/[^\w:]/g,oe=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Q(o,n,t){if(o){let e;try{e=decodeURIComponent(F(t)).replace(ae,"").toLowerCase()}catch{return null}if(e.indexOf("javascript:")===0||e.indexOf("vbscript:")===0||e.indexOf("data:")===0)return null}n&&!oe.test(t)&&(t=pe(n,t));try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}const M={},ce=/^[^:]+:\/*[^/]*$/,he=/^([^:]+:)[\s\S]*$/,ue=/^([^:]+:\/*[^/]*)[\s\S]*$/;function pe(o,n){M[" "+o]||(ce.test(o)?M[" "+o]=o+"/":M[" "+o]=D(o,"/",!0)),o=M[" "+o];const t=o.indexOf(":")===-1;return n.substring(0,2)==="//"?t?n:o.replace(he,"$1")+n:n.charAt(0)==="/"?t?n:o.replace(ue,"$1")+n:o+n}const P={exec:function(){}};function V(o,n){const t=o.replace(/\|/g,(s,l,a)=>{let h=!1,w=l;for(;--w>=0&&a[w]==="\\";)h=!h;return h?"|":" |"}),e=t.split(/ \|/);let i=0;if(e[0].trim()||e.shift(),e.length>0&&!e[e.length-1].trim()&&e.pop(),e.length>n)e.splice(n);else for(;e.length<n;)e.push("");for(;i<e.length;i++)e[i]=e[i].trim().replace(/\\\|/g,"|");return e}function D(o,n,t){const e=o.length;if(e===0)return"";let i=0;for(;i<e;){const s=o.charAt(e-i-1);if(s===n&&!t)i++;else if(s!==n&&t)i++;else break}return o.slice(0,e-i)}function fe(o,n){if(o.indexOf(n[1])===-1)return-1;const t=o.length;let e=0,i=0;for(;i<t;i++)if(o[i]==="\\")i++;else if(o[i]===n[0])e++;else if(o[i]===n[1]&&(e--,e<0))return i;return-1}function ge(o){o&&o.sanitize&&!o.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function X(o,n){if(n<1)return"";let t="";for(;n>1;)n&1&&(t+=o),n>>=1,o+=o;return t+o}function G(o,n,t,e){const i=n.href,s=n.title?A(n.title):null,l=o[1].replace(/\\([\[\]])/g,"$1");if(o[0].charAt(0)!=="!"){e.state.inLink=!0;const a={type:"link",raw:t,href:i,title:s,text:l,tokens:e.inlineTokens(l)};return e.state.inLink=!1,a}return{type:"image",raw:t,href:i,title:s,text:A(l)}}function de(o,n){const t=o.match(/^(\s+)(?:```)/);if(t===null)return n;const e=t[1];return n.split(`
|
||||
`).map(i=>{const s=i.match(/^\s+/);if(s===null)return i;const[l]=s;return l.length>=e.length?i.slice(e.length):i}).join(`
|
||||
`)}class B{constructor(n){this.options=n||z}space(n){const t=this.rules.block.newline.exec(n);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(n){const t=this.rules.block.code.exec(n);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:D(e,`
|
||||
`)}}}fences(n){const t=this.rules.block.fences.exec(n);if(t){const e=t[0],i=de(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline._escapes,"$1"):t[2],text:i}}}heading(n){const t=this.rules.block.heading.exec(n);if(t){let e=t[2].trim();if(/#$/.test(e)){const i=D(e,"#");(this.options.pedantic||!i||/ $/.test(i))&&(e=i.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(n){const t=this.rules.block.hr.exec(n);if(t)return{type:"hr",raw:t[0]}}blockquote(n){const t=this.rules.block.blockquote.exec(n);if(t){const e=t[0].replace(/^ *>[ \t]?/gm,""),i=this.lexer.state.top;this.lexer.state.top=!0;const s=this.lexer.blockTokens(e);return this.lexer.state.top=i,{type:"blockquote",raw:t[0],tokens:s,text:e}}}list(n){let t=this.rules.block.list.exec(n);if(t){let e,i,s,l,a,h,w,x,b,c,r,m,g=t[1].trim();const y=g.length>1,p={type:"list",raw:"",ordered:y,start:y?+g.slice(0,-1):"",loose:!1,items:[]};g=y?`\\d{1,9}\\${g.slice(-1)}`:`\\${g}`,this.options.pedantic&&(g=y?g:"[*+-]");const k=new RegExp(`^( {0,3}${g})((?:[ ][^\\n]*)?(?:\\n|$))`);for(;n&&(m=!1,!(!(t=k.exec(n))||this.rules.block.hr.test(n)));){if(e=t[0],n=n.substring(e.length),x=t[2].split(`
|
||||
|
Reference in New Issue
Block a user