|
|
+!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).markdownitMark=n()}(this,(function(){"use strict";return function(e){function n(e,n){const t=[],o=n.length;for(let s=0;s<o;s++){const o=n[s];if(61!==o.marker)continue;if(-1===o.end)continue;const r=n[o.end],i=e.tokens[o.token];i.type="mark_open",i.tag="mark",i.nesting=1,i.markup="==",i.content="";const c=e.tokens[r.token];c.type="mark_close",c.tag="mark",c.nesting=-1,c.markup="==",c.content="","text"===e.tokens[r.token-1].type&&"="===e.tokens[r.token-1].content&&t.push(r.token-1)}for(;t.length;){const n=t.pop();let o=n+1;for(;o<e.tokens.length&&"mark_close"===e.tokens[o].type;)o++;if(o--,n!==o){const t=e.tokens[o];e.tokens[o]=e.tokens[n],e.tokens[n]=t}}}e.inline.ruler.before("emphasis","mark",(function(e,n){const t=e.pos,o=e.src.charCodeAt(t);if(n)return!1;if(61!==o)return!1;const s=e.scanDelims(e.pos,!0);let r=s.length;const i=String.fromCharCode(o);if(r<2)return!1;if(r%2){e.push("text","",0).content=i,r--}for(let n=0;n<r;n+=2){e.push("text","",0).content=i+i,(s.can_open||s.can_close)&&e.delimiters.push({marker:o,length:0,jump:n/2,token:e.tokens.length-1,end:-1,open:s.can_open,close:s.can_close})}return e.pos+=s.length,!0})),e.inline.ruler2.before("emphasis","mark",(function(e){let t;const o=e.tokens_meta,s=(e.tokens_meta||[]).length;for(n(e,e.delimiters),t=0;t<s;t++)o[t]&&o[t].delimiters&&n(e,o[t].delimiters)}))}}));
|