mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-10-20 22:51:18 +02:00
Polish website UX: unify dashboards, clean up layout, modernize styling (#668)
This commit is contained in:
1 parent
8198a4b44a
commit
261eaa8d79
9 files changed
+1378
-1925
No files matched your search
+344
-793
File diff suppressed because it is too large.
Load diff
Vendored
+2
-2
@@ -1,4 +1,4 @@
|
||||
!function(me){"use strict";function i(e){if(!ye(e))return rn;C(e.objectMaxDepth)&&(rn.objectMaxDepth=$(e.objectMaxDepth)?e.objectMaxDepth:NaN),C(e.urlErrorParamsEnabled)&&A(e.urlErrorParamsEnabled)&&(rn.urlErrorParamsEnabled=e.urlErrorParamsEnabled)}function $(e){return b(e)&&0<e}function j(s,o){return o=o||Error,function(){var e=arguments[0];for(t="["+(s?s+":":"")+e+"] http://errors.angularjs.org/1.8.2/"+(s?s+"/":"")+e,e=1;e<arguments.length;e++){var t=t+(1==e?"?":"&")+"p"+(e-1)+"=",i=encodeURIComponent,n=arguments[e];t+=i(n="function"==typeof n?n.toString().replace(/ \{[\s\S]*$/,""):void 0===n?"undefined":"string"!=typeof n?JSON.stringify(n):n)}return new o(t)}}function M(e){var t;return null!=e&&!h(e)&&($e(e)||we(e)||Ce&&e instanceof Ce||b(t="length"in Object(e)&&e.length)&&(0<=t&&t-1 in e||"function"==typeof e.item))}function fe(e,t,i){if(e)if(xe(e))for(s in e)"prototype"!==s&&"length"!==s&&"name"!==s&&e.hasOwnProperty(s)&&t.call(i,e[s],s,e);else if($e(e)||M(e))for(var n="object"!=typeof e,s=0,o=e.length;s<o;s++)(n||s in e)&&t.call(i,e[s],s,e);else if(e.forEach&&e.forEach!==fe)e.forEach(t,i,e);else if(l(e))for(s in e)t.call(i,e[s],s,e);else if("function"==typeof e.hasOwnProperty)for(s in e)e.hasOwnProperty(s)&&t.call(i,e[s],s,e);else for(s in e)cn.call(e,s)&&t.call(i,e[s],s,e);return e}function r(e,t,i){for(var n=Object.keys(e).sort(),s=0;s<n.length;s++)t.call(i,e[n[s]],n[s])}function k(i){return function(e,t){i(t,e)}}function g(e,t,i){for(var n=e.$$hashKey,s=0,o=t.length;s<o;++s){var r=t[s];if(ye(r)||xe(r))for(var a=Object.keys(r),c=0,l=a.length;c<l;c++){var u=a[c],h=r[u];i&&ye(h)?x(h)?e[u]=new Date(h.valueOf()):m(h)?e[u]=new RegExp(h):h.nodeName?e[u]=h.cloneNode(!0):L(h)?e[u]=h.clone():"__proto__"!==u&&(ye(e[u])||(e[u]=$e(h)?[]:{}),g(e[u],[h],!0)):e[u]=h}}return n?e.$$hashKey=n:delete e.$$hashKey,e}function be(e){return g(e,un.call(arguments,1),!1)}function n(e){return g(e,un.call(arguments,1),!0)}function f(e){return parseInt(e,10)}function Re(e,t){return be(Object.create(e),t)}function S(){}function Me(e){return e}function _(e){return function(){return e}}function u(e){return xe(e.toString)&&e.toString!==v}function ve(e){return void 0===e}function C(e){return void 0!==e}function ye(e){return null!==e&&"object"==typeof e}function l(e){return null!==e&&"object"==typeof e&&!gn(e)}function we(e){return"string"==typeof e}function b(e){return"number"==typeof e}function x(e){return"[object Date]"===v.call(e)}function $e(e){return Array.isArray(e)||e instanceof Array}function Le(e){switch(v.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return 1;default:return e instanceof Error}}function xe(e){return"function"==typeof e}function m(e){return"[object RegExp]"===v.call(e)}function h(e){return e&&e.window===e}function Oe(e){return e&&e.$evalAsync&&e.$watch}function A(e){return"boolean"==typeof e}function L(e){return!(!e||!(e.nodeName||e.prop&&e.attr&&e.find))}function ke(e){return Te(e.nodeName||e[0]&&e[0].nodeName)}function De(e,t){t=e.indexOf(t);return 0<=t&&e.splice(t,1),t}function O(e,i,t){function s(e,t,i){if(--i<0)return"...";var n=t.$$hashKey;if($e(e))for(var s=0,o=e.length;s<o;s++)t.push(r(e[s],i));else if(l(e))for(s in e)t[s]=r(e[s],i);else if(e&&"function"==typeof e.hasOwnProperty)for(s in e)e.hasOwnProperty(s)&&(t[s]=r(e[s],i));else for(s in e)cn.call(e,s)&&(t[s]=r(e[s],i));return n?t.$$hashKey=n:delete t.$$hashKey,t}function r(e,t){if(!ye(e))return e;if(-1!==(i=o.indexOf(e)))return a[i];if(h(e)||Oe(e))throw pn("cpws");var i=!1,n=function(e){switch(v.call(e)){case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Float32Array]":case"[object Float64Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return new e.constructor(r(e.buffer),e.byteOffset,e.length);case"[object ArrayBuffer]":var t;return e.slice?e.slice(0):(t=new ArrayBuffer(e.byteLength),new Uint8Array(t).set(new Uint8Array(e)),t);case"[object Boolean]":case"[object Number]":case"[object String]":case"[object Date]":return new e.constructor(e.valueOf());case"[object RegExp]":return(t=new RegExp(e.source,e.toString().match(/[^/]*$/)[0])).lastIndex=e.lastIndex,t;case"[object Blob]":return new e.constructor([e],{type:e.type})}if(xe(e.cloneNode))return e.cloneNode(!0)}(e);return void 0===n&&(n=$e(e)?[]:Object.create(gn(e)),i=!0),o.push(e),a.push(n),i?s(e,n,t):n}var n,o=[],a=[];if(t=$(t)?t:NaN,i){if((n=i)&&b(n.length)&&bn.test(v.call(n))||"[object ArrayBuffer]"===v.call(i))throw pn("cpta");if(e===i)throw pn("cpi");return $e(i)?i.length=0:fe(i,function(e,t){"$$hashKey"!==t&&delete i[t]}),o.push(e),a.push(i),s(e,i,t)}return r(e,t)}function Ie(e,t){return e===t||e!=e&&t!=t}function Ae(e,t){if(e===t)return!0;if(null!==e&&null!==t){if(e!=e&&t!=t)return!0;var i,n=typeof e;if(n===typeof t&&"object"===n){if(!$e(e)){if(x(e))return!!x(t)&&Ie(e.getTime(),t.getTime());if(m(e))return!!m(t)&&e.toString()===t.toString();Line truncated
|
||||
!function(me){"use strict";function i(e){if(!ye(e))return rn;C(e.objectMaxDepth)&&(rn.objectMaxDepth=$(e.objectMaxDepth)?e.objectMaxDepth:NaN),C(e.urlErrorParamsEnabled)&&A(e.urlErrorParamsEnabled)&&(rn.urlErrorParamsEnabled=e.urlErrorParamsEnabled)}function $(e){return b(e)&&0<e}function j(s,o){return o=o||Error,function(){var e=arguments[0];for(t="["+(s?s+":":"")+e+"] http://errors.angularjs.org/1.8.2/"+(s?s+"/":"")+e,e=1;e<arguments.length;e++){var t=t+(1==e?"?":"&")+"p"+(e-1)+"=",i=encodeURIComponent,n=arguments[e];t+=i(n="function"==typeof n?n.toString().replace(/ \{[\s\S]*$/,""):void 0===n?"undefined":"string"!=typeof n?JSON.stringify(n):n)}return new o(t)}}function M(e){var t;return null!=e&&!h(e)&&($e(e)||we(e)||Ce&&e instanceof Ce||b(t="length"in Object(e)&&e.length)&&(0<=t&&t-1 in e||"function"==typeof e.item))}function fe(e,t,i){if(e)if(xe(e))for(s in e)"prototype"!==s&&"length"!==s&&"name"!==s&&e.hasOwnProperty(s)&&t.call(i,e[s],s,e);else if($e(e)||M(e))for(var n="object"!=typeof e,s=0,o=e.length;s<o;s++)(n||s in e)&&t.call(i,e[s],s,e);else if(e.forEach&&e.forEach!==fe)e.forEach(t,i,e);else if(l(e))for(s in e)t.call(i,e[s],s,e);else if("function"==typeof e.hasOwnProperty)for(s in e)e.hasOwnProperty(s)&&t.call(i,e[s],s,e);else for(s in e)cn.call(e,s)&&t.call(i,e[s],s,e);return e}function r(e,t,i){for(var n=Object.keys(e).sort(),s=0;s<n.length;s++)t.call(i,e[n[s]],n[s])}function k(i){return function(e,t){i(t,e)}}function g(e,t,i){for(var n=e.$$hashKey,s=0,o=t.length;s<o;++s){var r=t[s];if(ye(r)||xe(r))for(var a=Object.keys(r),c=0,l=a.length;c<l;c++){var u=a[c],h=r[u];i&&ye(h)?x(h)?e[u]=new Date(h.valueOf()):m(h)?e[u]=new RegExp(h):h.nodeName?e[u]=h.cloneNode(!0):L(h)?e[u]=h.clone():"__proto__"!==u&&(ye(e[u])||(e[u]=$e(h)?[]:{}),g(e[u],[h],!0)):e[u]=h}}return n?e.$$hashKey=n:delete e.$$hashKey,e}function be(e){return g(e,un.call(arguments,1),!1)}function n(e){return g(e,un.call(arguments,1),!0)}function f(e){return parseInt(e,10)}function Re(e,t){return be(Object.create(e),t)}function S(){}function Me(e){return e}function _(e){return function(){return e}}function u(e){return xe(e.toString)&&e.toString!==v}function ve(e){return void 0===e}function C(e){return void 0!==e}function ye(e){return null!==e&&"object"==typeof e}function l(e){return null!==e&&"object"==typeof e&&!gn(e)}function we(e){return"string"==typeof e}function b(e){return"number"==typeof e}function x(e){return"[object Date]"===v.call(e)}function $e(e){return Array.isArray(e)||e instanceof Array}function Le(e){switch(v.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return 1;default:return e instanceof Error}}function xe(e){return"function"==typeof e}function m(e){return"[object RegExp]"===v.call(e)}function h(e){return e&&e.window===e}function Oe(e){return e&&e.$evalAsync&&e.$watch}function A(e){return"boolean"==typeof e}function L(e){return!(!e||!(e.nodeName||e.prop&&e.attr&&e.find))}function ke(e){return Te(e.nodeName||e[0]&&e[0].nodeName)}function Ie(e,t){t=e.indexOf(t);return 0<=t&&e.splice(t,1),t}function O(e,i,t){function s(e,t,i){if(--i<0)return"...";var n=t.$$hashKey;if($e(e))for(var s=0,o=e.length;s<o;s++)t.push(r(e[s],i));else if(l(e))for(s in e)t[s]=r(e[s],i);else if(e&&"function"==typeof e.hasOwnProperty)for(s in e)e.hasOwnProperty(s)&&(t[s]=r(e[s],i));else for(s in e)cn.call(e,s)&&(t[s]=r(e[s],i));return n?t.$$hashKey=n:delete t.$$hashKey,t}function r(e,t){if(!ye(e))return e;if(-1!==(i=o.indexOf(e)))return a[i];if(h(e)||Oe(e))throw pn("cpws");var i=!1,n=function(e){switch(v.call(e)){case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Float32Array]":case"[object Float64Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return new e.constructor(r(e.buffer),e.byteOffset,e.length);case"[object ArrayBuffer]":var t;return e.slice?e.slice(0):(t=new ArrayBuffer(e.byteLength),new Uint8Array(t).set(new Uint8Array(e)),t);case"[object Boolean]":case"[object Number]":case"[object String]":case"[object Date]":return new e.constructor(e.valueOf());case"[object RegExp]":return(t=new RegExp(e.source,e.toString().match(/[^/]*$/)[0])).lastIndex=e.lastIndex,t;case"[object Blob]":return new e.constructor([e],{type:e.type})}if(xe(e.cloneNode))return e.cloneNode(!0)}(e);return void 0===n&&(n=$e(e)?[]:Object.create(gn(e)),i=!0),o.push(e),a.push(n),i?s(e,n,t):n}var n,o=[],a=[];if(t=$(t)?t:NaN,i){if((n=i)&&b(n.length)&&bn.test(v.call(n))||"[object ArrayBuffer]"===v.call(i))throw pn("cpta");if(e===i)throw pn("cpi");return $e(i)?i.length=0:fe(i,function(e,t){"$$hashKey"!==t&&delete i[t]}),o.push(e),a.push(i),s(e,i,t)}return r(e,t)}function De(e,t){return e===t||e!=e&&t!=t}function Ae(e,t){if(e===t)return!0;if(null!==e&&null!==t){if(e!=e&&t!=t)return!0;var i,n=typeof e;if(n===typeof t&&"object"===n){if(!$e(e)){if(x(e))return!!x(t)&&De(e.getTime(),t.getTime());if(m(e))return!!m(t)&&e.toString()===t.toString();Line truncated
|
||||
${e}</blockquote>
|
||||
`}html(e,t){return e}heading(e,t,i){return`<h${t}>${e}</h${t}>
|
||||
`}hr(){return"<hr>\n"}list(e,t,i){var n=t?"ol":"ul";return"<"+n+(t&&1!==i?' start="'+i+'"':"")+">\n"+e+"</"+n+">\n"}listitem(e,t,i){return`<li>${e}</li>
|
||||
@@ -6,4 +6,4 @@ ${e}</blockquote>
|
||||
`}table(e,t){return"<table>\n<thead>\n"+e+"</thead>\n"+(t=t&&`<tbody>${t}</tbody>`)+"</table>\n"}tablerow(e){return`<tr>
|
||||
${e}</tr>
|
||||
`}tablecell(e,t){var i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+e+`</${i}>
|
||||
`}strong(e){return`<strong>${e}</strong>`}em(e){return`<em>${e}</em>`}codespan(e){return`<code>${e}</code>`}br(){return"<br>"}del(e){return`<del>${e}</del>`}link(e,t,i){var n=c(e);if(null===n)return i;let s='<a href="'+(e=n)+'"';return t&&(s+=' title="'+t+'"'),s+=">"+i+"</a>"}image(e,t,i){var n=c(e);if(null===n)return i;let s=`<img src="${e=n}" alt="${i}"`;return t&&(s+=` title="${t}"`),s+=">"}text(e){return e}}class R{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,i){return""+i}image(e,t,i){return""+i}br(){return""}}class M{options;renderer;textRenderer;constructor(e){this.options=e||t.defaults,this.options.renderer=this.options.renderer||new E,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new R}static parse(e,t){return new M(t).parse(e)}static parseInline(e,t){return new M(t).parseInline(e)}parse(n,s=!0){let o="";for(let i=0;i<n.length;i++){var r=n[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[r.type]){const n=r,s=this.options.extensions.renderers[n.type].call({parser:this},n);if(!1!==s||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(n.type)){o+=s||"";continue}}switch(r.type){case"space":continue;case"hr":o+=this.renderer.hr();continue;case"heading":{const n=r;o+=this.renderer.heading(this.parseInline(n.tokens),n.depth,this.parseInline(n.tokens,this.textRenderer).replace(F,(e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""));continue}case"code":{const n=r;o+=this.renderer.code(n.text,n.lang,!!n.escaped);continue}case"table":{const n=r;let e="",t="";for(let e=0;e<n.header.length;e++)t+=this.renderer.tablecell(this.parseInline(n.header[e].tokens),{header:!0,align:n.align[e]});e+=this.renderer.tablerow(t);let i="";for(let e=0;e<n.rows.length;e++){const o=n.rows[e];t="";for(let e=0;e<o.length;e++)t+=this.renderer.tablecell(this.parseInline(o[e].tokens),{header:!1,align:n.align[e]});i+=this.renderer.tablerow(t)}o+=this.renderer.table(e,i);continue}case"blockquote":{const n=r,s=this.parse(n.tokens);o+=this.renderer.blockquote(s);continue}case"list":{const n=r,s=n.ordered,e=n.start,a=n.loose;let i="";for(let t=0;t<n.items.length;t++){const o=n.items[t],c=o.checked,l=o.task;let e="";if(o.task){const n=this.renderer.checkbox(!!c);a?0<o.tokens.length&&"paragraph"===o.tokens[0].type?(o.tokens[0].text=n+" "+o.tokens[0].text,o.tokens[0].tokens&&0<o.tokens[0].tokens.length&&"text"===o.tokens[0].tokens[0].type&&(o.tokens[0].tokens[0].text=n+" "+o.tokens[0].tokens[0].text)):o.tokens.unshift({type:"text",text:n+" "}):e+=n+" "}e+=this.parse(o.tokens,a),i+=this.renderer.listitem(e,l,!!c)}o+=this.renderer.list(i,s,e);continue}case"html":{const n=r;o+=this.renderer.html(n.text,n.block);continue}case"paragraph":{const n=r;o+=this.renderer.paragraph(this.parseInline(n.tokens));continue}case"text":{let e=r,t=e.tokens?this.parseInline(e.tokens):e.text;for(;i+1<n.length&&"text"===n[i+1].type;)e=n[++i],t+="\n"+(e.tokens?this.parseInline(e.tokens):e.text);o+=s?this.renderer.paragraph(t):t;continue}default:{const n='Token with "'+r.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw new Error(n)}}}return o}parseInline(t,i){i=i||this.renderer;let n="";for(let e=0;e<t.length;e++){var s=t[e];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[s.type]){const t=this.options.extensions.renderers[s.type].call({parser:this},s);if(!1!==t||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){n+=t||"";continue}}switch(s.type){case"escape":{const t=s;n+=i.text(t.text);break}case"html":{const t=s;n+=i.html(t.text);break}case"link":{const t=s;n+=i.link(t.href,t.title,this.parseInline(t.tokens,i));break}case"image":{const t=s;n+=i.image(t.href,t.title,t.text);break}case"strong":{const t=s;n+=i.strong(this.parseInline(t.tokens,i));break}case"em":{const t=s;n+=i.em(this.parseInline(t.tokens,i));break}case"codespan":{const t=s;n+=i.codespan(t.text);break}case"br":n+=i.br();break;case"del":{const t=s;n+=i.del(this.parseInline(t.tokens,i));break}case"text":{const t=s;n+=i.text(t.text);break}default:{const t='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return n}}class L{options;constructor(e){this.options=e||t.defaults}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}}class ce{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.#e(j.lex,M.parse);parseInline=this.#e(j.lexInline,M.parseInline);Parser=M;Renderer=E;TextRenderer=RLine truncated
|
||||
`}strong(e){return`<strong>${e}</strong>`}em(e){return`<em>${e}</em>`}codespan(e){return`<code>${e}</code>`}br(){return"<br>"}del(e){return`<del>${e}</del>`}link(e,t,i){var n=c(e);if(null===n)return i;let s='<a href="'+(e=n)+'"';return t&&(s+=' title="'+t+'"'),s+=">"+i+"</a>"}image(e,t,i){var n=c(e);if(null===n)return i;let s=`<img src="${e=n}" alt="${i}"`;return t&&(s+=` title="${t}"`),s+=">"}text(e){return e}}class R{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,i){return""+i}image(e,t,i){return""+i}br(){return""}}class M{options;renderer;textRenderer;constructor(e){this.options=e||t.defaults,this.options.renderer=this.options.renderer||new E,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new R}static parse(e,t){return new M(t).parse(e)}static parseInline(e,t){return new M(t).parseInline(e)}parse(n,s=!0){let o="";for(let i=0;i<n.length;i++){var r=n[i];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[r.type]){const n=r,s=this.options.extensions.renderers[n.type].call({parser:this},n);if(!1!==s||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(n.type)){o+=s||"";continue}}switch(r.type){case"space":continue;case"hr":o+=this.renderer.hr();continue;case"heading":{const n=r;o+=this.renderer.heading(this.parseInline(n.tokens),n.depth,this.parseInline(n.tokens,this.textRenderer).replace(F,(e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""));continue}case"code":{const n=r;o+=this.renderer.code(n.text,n.lang,!!n.escaped);continue}case"table":{const n=r;let e="",t="";for(let e=0;e<n.header.length;e++)t+=this.renderer.tablecell(this.parseInline(n.header[e].tokens),{header:!0,align:n.align[e]});e+=this.renderer.tablerow(t);let i="";for(let e=0;e<n.rows.length;e++){const o=n.rows[e];t="";for(let e=0;e<o.length;e++)t+=this.renderer.tablecell(this.parseInline(o[e].tokens),{header:!1,align:n.align[e]});i+=this.renderer.tablerow(t)}o+=this.renderer.table(e,i);continue}case"blockquote":{const n=r,s=this.parse(n.tokens);o+=this.renderer.blockquote(s);continue}case"list":{const n=r,s=n.ordered,e=n.start,a=n.loose;let i="";for(let t=0;t<n.items.length;t++){const o=n.items[t],c=o.checked,l=o.task;let e="";if(o.task){const n=this.renderer.checkbox(!!c);a?0<o.tokens.length&&"paragraph"===o.tokens[0].type?(o.tokens[0].text=n+" "+o.tokens[0].text,o.tokens[0].tokens&&0<o.tokens[0].tokens.length&&"text"===o.tokens[0].tokens[0].type&&(o.tokens[0].tokens[0].text=n+" "+o.tokens[0].tokens[0].text)):o.tokens.unshift({type:"text",text:n+" "}):e+=n+" "}e+=this.parse(o.tokens,a),i+=this.renderer.listitem(e,l,!!c)}o+=this.renderer.list(i,s,e);continue}case"html":{const n=r;o+=this.renderer.html(n.text,n.block);continue}case"paragraph":{const n=r;o+=this.renderer.paragraph(this.parseInline(n.tokens));continue}case"text":{let e=r,t=e.tokens?this.parseInline(e.tokens):e.text;for(;i+1<n.length&&"text"===n[i+1].type;)e=n[++i],t+="\n"+(e.tokens?this.parseInline(e.tokens):e.text);o+=s?this.renderer.paragraph(t):t;continue}default:{const n='Token with "'+r.type+'" type was not found.';if(this.options.silent)return console.error(n),"";throw new Error(n)}}}return o}parseInline(t,i){i=i||this.renderer;let n="";for(let e=0;e<t.length;e++){var s=t[e];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[s.type]){const t=this.options.extensions.renderers[s.type].call({parser:this},s);if(!1!==t||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){n+=t||"";continue}}switch(s.type){case"escape":{const t=s;n+=i.text(t.text);break}case"html":{const t=s;n+=i.html(t.text);break}case"link":{const t=s;n+=i.link(t.href,t.title,this.parseInline(t.tokens,i));break}case"image":{const t=s;n+=i.image(t.href,t.title,t.text);break}case"strong":{const t=s;n+=i.strong(this.parseInline(t.tokens,i));break}case"em":{const t=s;n+=i.em(this.parseInline(t.tokens,i));break}case"codespan":{const t=s;n+=i.codespan(t.text);break}case"br":n+=i.br();break;case"del":{const t=s;n+=i.del(this.parseInline(t.tokens,i));break}case"text":{const t=s;n+=i.text(t.text);break}default:{const t='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return n}}class L{options;constructor(e){this.options=e||t.defaults}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}}class ce{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.#e(j.lex,M.parse);parseInline=this.#e(j.lexInline,M.parseInline);Parser=M;Renderer=E;TextRenderer=RLine truncated
|
||||
Reference in new issue
Block a user