Commit 4def53fb authored by Matthieu Le Corre's avatar Matthieu Le Corre
Browse files
parent 9d731ce8
## 1.1.4 XX-XX-2020
## 1.1.4 XX-04-2020
### Fixed
- Incorrect file name displayed
[#44](https://gitlab.univ-nantes.fr/uncloud/files_readmemd/issues/36#)
[#44](https://gitlab.univ-nantes.fr/uncloud/files_readmemd/issues/44#)
- if a folder's named as an expected filename (ie. readme.md) it triggers the plugin with an unexpected result
[#45](https://gitlab.univ-nantes.fr/uncloud/files_readmemd/issues/45#)
### Added
- Option to disable Nextcloud native rich workspaces
[#41](https://gitlab.univ-nantes.fr/uncloud/files_readmemd/issues/41#)
- Anchor links do not work
[#43](https://gitlab.univ-nantes.fr/uncloud/files_readmemd/issues/43#)
- Update plugins list in README.md
- NC 18 compatibility
## 1.1.3 25-11-2019
......
......@@ -30,9 +30,14 @@ Now you can use template to customize the README.md/HEADER.md rendering.
The following markdown plugins are available, more to come, fill a issue if you need more.
* Image sizing : [markdown-it-imsize](https://www.npmjs.com/package/markdown-it-imsize)
* Task list : [markdown-it-task-lists
](https://www.npmjs.com/package/markdown-it-task-lists)
* Task list : [markdown-it-task-lists](https://www.npmjs.com/package/markdown-it-task-lists)
* Code highlight : [markdown-it-highlightjs](https://www.npmjs.com/package/markdown-it-highlightjs)
* Mermaid : [markdown-it-mermaid-plus](https://www.npmjs.com/package/markdown-it-mermaid-plus)
* Katex : [markdown-it-katex](https://www.npmjs.com/package/markdown-it-katex)
* image resize : [imsize](https://www.npmjs.com/package/markdown-it-imsize)
* Anchord : [markdown-it-anchor](https://www.npmjs.com/package/markdown-it-anchor)
* Table of Contents : [markdown-it-toc-done-right](https://www.npmjs.com/package/markdown-it-toc-done-right)
# Admin section
......
!function(e){var t={};function a(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.m=e,a.c=t,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(n,r,function(t){return e[t]}.bind(null,r));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=28)}({28:function(e,t){
!function(e){var a={};function t(n){if(a[n])return a[n].exports;var r=a[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}t.m=e,t.c=a,t.d=function(e,a,n){t.o(e,a)||Object.defineProperty(e,a,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,a){if(1&a&&(e=t(e)),8&a)return e;if(4&a&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&a&&"string"!=typeof e)for(var r in e)t.d(n,r,function(a){return e[a]}.bind(null,r));return n},t.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(a,"a",a),a},t.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},t.p="",t(t.s=132)}({132:function(e,a){
/**
* @author Matthieu Le Corre <matthieu.lecorre@univ-nantes.fr>
*
......@@ -18,5 +18,5 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
$(document).ready((function(){$("#readmeMD-appearance-txt").click((function(e){$.post(OC.generateUrl("apps/files_readmemd/config"),{key:"show_title",value:e.target.checked}).success((function(e){}))})),$("#readmeMD-appearance-color").click((function(e){$.post(OC.generateUrl("apps/files_readmemd/config"),{key:"yellow_back",value:e.target.checked}).success((function(e){}))})),$("#readmeMD-appearance-refresh").click((function(e){$.post(OC.generateUrl("apps/files_readmemd/config"),{key:"auto_refresh",value:e.target.checked}).success((function(e){}))})),$("#readmeMD-engine-asciidoc").click((function(e){$.post(OC.generateUrl("apps/files_readmemd/config"),{key:"show_asciidoc",value:e.target.checked}).success((function(e){}))})),$("#readmeMD-engine-html").click((function(e){$.post(OC.generateUrl("apps/files_readmemd/config"),{key:"show_html",value:e.target.checked}).success((function(e){}))})),$(".readmeMD-filelist_delete").on("click",(function(e){var t=this,a=e.target.dataset.filename,n=e.target.dataset.zone;$.ajax({url:OC.generateUrl("apps/files_readmemd/config/filenames/"+n+"/"+a.replace("?","%3F")),type:"DELETE",success:function(e){$(t).parent().remove()}})})),$("#readmeMD-filelist_submit-footer").on("click",(function(e){var t=$("#readmeMD-filelist_name-footer")[0].value;$.ajax({url:OC.generateUrl("apps/files_readmemd/config/filenames/footer/"+t.replace("?","%3F")),type:"PUT",success:function(e){$("#readmeMD-filelist_footer").append('<li class="readmeMD-filelist" id="readmeMD-filelist-'+t+'"><a data-zone="footer" data-filename="'+t+'" class="readmeMD-filelist_delete icon-inline icon icon-delete"></a>'+t+"</li>")}})})),$("#readmeMD-filelist_submit-header").on("click",(function(e){var t=$("#readmeMD-filelist_name-header")[0].value;$.ajax({url:OC.generateUrl("apps/files_readmemd/config/filenames/header/"+t.replace("?","%3F")),type:"PUT",success:function(e){$("#readmeMD-filelist_header").append('<li class="readmeMD-filelist" id="readmeMD-filelist-'+t+'"><a data-zone="header" data-filename="'+t+'" class="readmeMD-filelist_delete icon-inline icon icon-delete"></a>'+t+"</li>")}})}))}))}});
$(document).ready((function(){$("#readmeMD-appearance-txt").click((function(e){$.post(OC.generateUrl("apps/files_readmemd/config"),{key:"show_title",value:e.target.checked}).success((function(e){}))})),$("#readmeMD-appearance-color").click((function(e){$.post(OC.generateUrl("apps/files_readmemd/config"),{key:"yellow_back",value:e.target.checked}).success((function(e){}))})),$("#readmeMD-appearance-refresh").click((function(e){$.post(OC.generateUrl("apps/files_readmemd/config"),{key:"auto_refresh",value:e.target.checked}).success((function(e){}))})),$("#readmeMD-appearance-workspace").click((function(e){$.post(OC.generateUrl("apps/files_readmemd/config"),{key:"disable_workspace",value:e.target.checked}).success((function(e){}))})),$("#readmeMD-engine-asciidoc").click((function(e){$.post(OC.generateUrl("apps/files_readmemd/config"),{key:"show_asciidoc",value:e.target.checked}).success((function(e){}))})),$("#readmeMD-engine-html").click((function(e){$.post(OC.generateUrl("apps/files_readmemd/config"),{key:"show_html",value:e.target.checked}).success((function(e){}))})),$(".readmeMD-filelist_delete").on("click",(function(e){var a=this,t=e.target.dataset.filename,n=e.target.dataset.zone;$.ajax({url:OC.generateUrl("apps/files_readmemd/config/filenames/"+n+"/"+t.replace("?","%3F")),type:"DELETE",success:function(e){$(a).parent().remove()}})})),$("#readmeMD-filelist_submit-footer").on("click",(function(e){var a=$("#readmeMD-filelist_name-footer")[0].value;$.ajax({url:OC.generateUrl("apps/files_readmemd/config/filenames/footer/"+a.replace("?","%3F")),type:"PUT",success:function(e){$("#readmeMD-filelist_footer").append('<li class="readmeMD-filelist" id="readmeMD-filelist-'+a+'"><a data-zone="footer" data-filename="'+a+'" class="readmeMD-filelist_delete icon-inline icon icon-delete"></a>'+a+"</li>")}})})),$("#readmeMD-filelist_submit-header").on("click",(function(e){var a=$("#readmeMD-filelist_name-header")[0].value;$.ajax({url:OC.generateUrl("apps/files_readmemd/config/filenames/header/"+a.replace("?","%3F")),type:"PUT",success:function(e){$("#readmeMD-filelist_header").append('<li class="readmeMD-filelist" id="readmeMD-filelist-'+a+'"><a data-zone="header" data-filename="'+a+'" class="readmeMD-filelist_delete icon-inline icon icon-delete"></a>'+a+"</li>")}})}))}))}});
//# sourceMappingURL=config.js.map
\ No newline at end of file
This diff is collapsed.
(window.webpackJsonpFileReadmeMD=window.webpackJsonpFileReadmeMD||[]).push([[2],{34:function(r,e,n){"use strict";var t=n(29);function c(r,e){var n,t,c=r.posMax,i=!0,o=!0;return n=e>0?r.src.charCodeAt(e-1):-1,t=e+1<=c?r.src.charCodeAt(e+1):-1,(32===n||9===n||t>=48&&t<=57)&&(o=!1),32!==t&&9!==t||(i=!1),{can_open:i,can_close:o}}function i(r,e){var n,t,i,o;if("$"!==r.src[r.pos])return!1;if(!c(r,r.pos).can_open)return e||(r.pending+="$"),r.pos+=1,!0;for(t=n=r.pos+1;-1!==(t=r.src.indexOf("$",t));){for(o=t-1;"\\"===r.src[o];)o-=1;if((t-o)%2==1)break;t+=1}return-1===t?(e||(r.pending+="$"),r.pos=n,!0):t-n==0?(e||(r.pending+="$$"),r.pos=n+1,!0):c(r,t).can_close?(e||((i=r.push("math_inline","math",0)).markup="$",i.content=r.src.slice(n,t)),r.pos=t+1,!0):(e||(r.pending+="$"),r.pos=n,!0)}function o(r,e,n,t){var c,i,o,s,a,l=!1,u=r.bMarks[e]+r.tShift[e],p=r.eMarks[e];if(u+2>p)return!1;if("$$"!==r.src.slice(u,u+2))return!1;if(u+=2,c=r.src.slice(u,p),t)return!0;for("$$"===c.trim().slice(-2)&&(c=c.trim().slice(0,-2),l=!0),o=e;!l&&!(++o>=n)&&!((u=r.bMarks[o]+r.tShift[o])<(p=r.eMarks[o])&&r.tShift[o]<r.blkIndent);)"$$"===r.src.slice(u,p).trim().slice(-2)&&(s=r.src.slice(0,p).lastIndexOf("$$"),i=r.src.slice(u,s),l=!0);return r.line=o+1,(a=r.push("math_block","math",0)).block=!0,a.content=(c&&c.trim()?c+"\n":"")+r.getLines(e+1,o,r.tShift[e],!0)+(i&&i.trim()?i:""),a.map=[e,r.line],a.markup="$$",!0}r.exports=function(r,e){e=e||{};r.inline.ruler.after("escape","math_inline",i),r.block.ruler.after("blockquote","math_block",o,{alt:["paragraph","reference","blockquote","list"]}),r.renderer.rules.math_inline=function(r,n){return function(r){e.displayMode=!1;try{return t.renderToString(r,e)}catch(n){return e.throwOnError&&console.log(n),r}}(r[n].content)},r.renderer.rules.math_block=function(r,n){return function(r){e.displayMode=!0;try{return"<p>"+t.renderToString(r,e)+"</p>"}catch(n){return e.throwOnError&&console.log(n),r}}(r[n].content)+"\n"}}}}]);
(window.webpackJsonpFileReadmeMD=window.webpackJsonpFileReadmeMD||[]).push([[2],{138:function(r,e,n){"use strict";var t=n(133);function c(r,e){var n,t,c=r.posMax,i=!0,o=!0;return n=e>0?r.src.charCodeAt(e-1):-1,t=e+1<=c?r.src.charCodeAt(e+1):-1,(32===n||9===n||t>=48&&t<=57)&&(o=!1),32!==t&&9!==t||(i=!1),{can_open:i,can_close:o}}function i(r,e){var n,t,i,o;if("$"!==r.src[r.pos])return!1;if(!c(r,r.pos).can_open)return e||(r.pending+="$"),r.pos+=1,!0;for(t=n=r.pos+1;-1!==(t=r.src.indexOf("$",t));){for(o=t-1;"\\"===r.src[o];)o-=1;if((t-o)%2==1)break;t+=1}return-1===t?(e||(r.pending+="$"),r.pos=n,!0):t-n==0?(e||(r.pending+="$$"),r.pos=n+1,!0):c(r,t).can_close?(e||((i=r.push("math_inline","math",0)).markup="$",i.content=r.src.slice(n,t)),r.pos=t+1,!0):(e||(r.pending+="$"),r.pos=n,!0)}function o(r,e,n,t){var c,i,o,s,a,l=!1,u=r.bMarks[e]+r.tShift[e],p=r.eMarks[e];if(u+2>p)return!1;if("$$"!==r.src.slice(u,u+2))return!1;if(u+=2,c=r.src.slice(u,p),t)return!0;for("$$"===c.trim().slice(-2)&&(c=c.trim().slice(0,-2),l=!0),o=e;!l&&!(++o>=n)&&!((u=r.bMarks[o]+r.tShift[o])<(p=r.eMarks[o])&&r.tShift[o]<r.blkIndent);)"$$"===r.src.slice(u,p).trim().slice(-2)&&(s=r.src.slice(0,p).lastIndexOf("$$"),i=r.src.slice(u,s),l=!0);return r.line=o+1,(a=r.push("math_block","math",0)).block=!0,a.content=(c&&c.trim()?c+"\n":"")+r.getLines(e+1,o,r.tShift[e],!0)+(i&&i.trim()?i:""),a.map=[e,r.line],a.markup="$$",!0}r.exports=function(r,e){e=e||{};r.inline.ruler.after("escape","math_inline",i),r.block.ruler.after("blockquote","math_block",o,{alt:["paragraph","reference","blockquote","list"]}),r.renderer.rules.math_inline=function(r,n){return function(r){e.displayMode=!1;try{return t.renderToString(r,e)}catch(n){return e.throwOnError&&console.log(n),r}}(r[n].content)},r.renderer.rules.math_block=function(r,n){return function(r){e.displayMode=!0;try{return"<p>"+t.renderToString(r,e)+"</p>"}catch(n){return e.throwOnError&&console.log(n),r}}(r[n].content)+"\n"}}}}]);
//# sourceMappingURL=m-it-katex.js.map
\ No newline at end of file
{"version":3,"sources":["webpack:///./node_modules/markdown-it-katex/index.js"],"names":["katex","isValidDelim","state","pos","prevChar","nextChar","max","posMax","can_open","can_close","src","charCodeAt","math_inline","silent","start","match","token","pending","indexOf","push","markup","content","slice","math_block","end","firstLine","lastLine","next","lastPos","found","bMarks","tShift","eMarks","trim","blkIndent","lastIndexOf","line","block","getLines","map","module","exports","md","options","inline","ruler","after","alt","renderer","rules","tokens","idx","latex","displayMode","renderToString","error","throwOnError","console","log","katexInline","katexBlock"],"mappings":"iHAYA,IAAIA,EAAQ,EAAQ,IAIpB,SAASC,EAAaC,EAAOC,GACzB,IAAIC,EAAUC,EACVC,EAAMJ,EAAMK,OACZC,GAAW,EACXC,GAAY,EAehB,OAbAL,EAAWD,EAAM,EAAID,EAAMQ,IAAIC,WAAWR,EAAM,IAAM,EACtDE,EAAWF,EAAM,GAAKG,EAAMJ,EAAMQ,IAAIC,WAAWR,EAAM,IAAM,GAI5C,KAAbC,GAA2C,IAAbA,GACzBC,GAAY,IAAiBA,GAAY,MAC9CI,GAAY,GAEC,KAAbJ,GAA2C,IAAbA,IAC9BG,GAAW,GAGR,CACHA,SAAUA,EACVC,UAAWA,GAInB,SAASG,EAAYV,EAAOW,GACxB,IAAIC,EAAOC,EAAOC,EAAYb,EAE9B,GAA6B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aAAc,EACtB,IACI,MAAO,MAAQrD,EAAMsD,eAAeF,EAAOT,GAAW,OAE1D,MAAMY,GAEF,OADGZ,EAAQa,cAAeC,QAAQC,IAAIH,GAC/BH,GAKHQ,CAAWV,EAAOC,GAAK9B,SAAW","file":"m-it-katex.js","sourcesContent":["/* Process inline math */\n/*\nLike markdown-it-simplemath, this is a stripped down, simplified version of:\nhttps://github.com/runarberg/markdown-it-math\n\nIt differs in that it takes (a subset of) LaTeX as input and relies on KaTeX\nfor rendering output.\n*/\n\n/*jslint node: true */\n'use strict';\n\nvar katex = require('katex');\n\n// Test if potential opening or closing delimieter\n// Assumes that there is a \"$\" at state.src[pos]\nfunction isValidDelim(state, pos) {\n var prevChar, nextChar,\n max = state.posMax,\n can_open = true,\n can_close = true;\n\n prevChar = pos > 0 ? state.src.charCodeAt(pos - 1) : -1;\n nextChar = pos + 1 <= max ? state.src.charCodeAt(pos + 1) : -1;\n\n // Check non-whitespace conditions for opening and closing, and\n // check that closing delimeter isn't followed by a number\n if (prevChar === 0x20/* \" \" */ || prevChar === 0x09/* \\t */ ||\n (nextChar >= 0x30/* \"0\" */ && nextChar <= 0x39/* \"9\" */)) {\n can_close = false;\n }\n if (nextChar === 0x20/* \" \" */ || nextChar === 0x09/* \\t */) {\n can_open = false;\n }\n\n return {\n can_open: can_open,\n can_close: can_close\n };\n}\n\nfunction math_inline(state, silent) {\n var start, match, token, res, pos, esc_count;\n\n if (state.src[state.pos] !== \"$\") { return false; }\n\n res = isValidDelim(state, state.pos);\n if (!res.can_open) {\n if (!silent) { state.pending += \"$\"; }\n state.pos += 1;\n return true;\n }\n\n // First check for and bypass all properly escaped delimieters\n // This loop will assume that the first leading backtick can not\n // be the first character in state.src, which is known since\n // we have found an opening delimieter already.\n start = state.pos + 1;\n match = start;\n while ( (match = state.src.indexOf(\"$\", match)) !== -1) {\n // Found potential $, look for escapes, pos will point to\n // first non escape when complete\n pos = match - 1;\n while (state.src[pos] === \"\\\\\") { pos -= 1; }\n\n // Even number of escapes, potential closing delimiter found\n if ( ((match - pos) % 2) == 1 ) { break; }\n match += 1;\n }\n\n // No closing delimter found. Consume $ and continue.\n if (match === -1) {\n if (!silent) { state.pending += \"$\"; }\n state.pos = start;\n return true;\n }\n\n // Check if we have empty content, ie: $$. Do not parse.\n if (match - start === 0) {\n if (!silent) { state.pending += \"$$\"; }\n state.pos = start + 1;\n return true;\n }\n\n // Check for valid closing delimiter\n res = isValidDelim(state, match);\n if (!res.can_close) {\n if (!silent) { state.pending += \"$\"; }\n state.pos = start;\n return true;\n }\n\n if (!silent) {\n token = state.push('math_inline', 'math', 0);\n token.markup = \"$\";\n token.content = state.src.slice(start, match);\n }\n\n state.pos = match + 1;\n return true;\n}\n\nfunction math_block(state, start, end, silent){\n var firstLine, lastLine, next, lastPos, found = false, token,\n pos = state.bMarks[start] + state.tShift[start],\n max = state.eMarks[start]\n\n if(pos + 2 > max){ return false; }\n if(state.src.slice(pos,pos+2)!=='$$'){ return false; }\n\n pos += 2;\n firstLine = state.src.slice(pos,max);\n\n if(silent){ return true; }\n if(firstLine.trim().slice(-2)==='$$'){\n // Single line expression\n firstLine = firstLine.trim().slice(0, -2);\n found = true;\n }\n\n for(next = start; !found; ){\n\n next++;\n\n if(next >= end){ break; }\n\n pos = state.bMarks[next]+state.tShift[next];\n max = state.eMarks[next];\n\n if(pos < max && state.tShift[next] < state.blkIndent){\n // non-empty line with negative indent should stop the list:\n break;\n }\n\n if(state.src.slice(pos,max).trim().slice(-2)==='$$'){\n lastPos = state.src.slice(0,max).lastIndexOf('$$');\n lastLine = state.src.slice(pos,lastPos);\n found = true;\n }\n\n }\n\n state.line = next + 1;\n\n token = state.push('math_block', 'math', 0);\n token.block = true;\n token.content = (firstLine && firstLine.trim() ? firstLine + '\\n' : '')\n + state.getLines(start + 1, next, state.tShift[start], true)\n + (lastLine && lastLine.trim() ? lastLine : '');\n token.map = [ start, state.line ];\n token.markup = '$$';\n return true;\n}\n\nmodule.exports = function math_plugin(md, options) {\n // Default options\n\n options = options || {};\n\n // set KaTeX as the renderer for markdown-it-simplemath\n var katexInline = function(latex){\n options.displayMode = false;\n try{\n return katex.renderToString(latex, options);\n }\n catch(error){\n if(options.throwOnError){ console.log(error); }\n return latex;\n }\n };\n\n var inlineRenderer = function(tokens, idx){\n return katexInline(tokens[idx].content);\n };\n\n var katexBlock = function(latex){\n options.displayMode = true;\n try{\n return \"<p>\" + katex.renderToString(latex, options) + \"</p>\";\n }\n catch(error){\n if(options.throwOnError){ console.log(error); }\n return latex;\n }\n }\n\n var blockRenderer = function(tokens, idx){\n return katexBlock(tokens[idx].content) + '\\n';\n }\n\n md.inline.ruler.after('escape', 'math_inline', math_inline);\n md.block.ruler.after('blockquote', 'math_block', math_block, {\n alt: [ 'paragraph', 'reference', 'blockquote', 'list' ]\n });\n md.renderer.rules.math_inline = inlineRenderer;\n md.renderer.rules.math_block = blockRenderer;\n};\n"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["webpack:///./node_modules/markdown-it-katex/index.js"],"names":["katex","isValidDelim","state","pos","prevChar","nextChar","max","posMax","can_open","can_close","src","charCodeAt","math_inline","silent","start","match","token","pending","indexOf","push","markup","content","slice","math_block","end","firstLine","lastLine","next","lastPos","found","bMarks","tShift","eMarks","trim","blkIndent","lastIndexOf","line","block","getLines","map","module","exports","md","options","inline","ruler","after","alt","renderer","rules","tokens","idx","latex","displayMode","renderToString","error","throwOnError","console","log","katexInline","katexBlock"],"mappings":"kHAYA,IAAIA,EAAQ,EAAQ,KAIpB,SAASC,EAAaC,EAAOC,GACzB,IAAIC,EAAUC,EACVC,EAAMJ,EAAMK,OACZC,GAAW,EACXC,GAAY,EAehB,OAbAL,EAAWD,EAAM,EAAID,EAAMQ,IAAIC,WAAWR,EAAM,IAAM,EACtDE,EAAWF,EAAM,GAAKG,EAAMJ,EAAMQ,IAAIC,WAAWR,EAAM,IAAM,GAI5C,KAAbC,GAA2C,IAAbA,GACzBC,GAAY,IAAiBA,GAAY,MAC9C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ADGZ,EAAQa,cAAeC,QAAQC,IAAIH,GAC/BH,GAKJO,CAAYT,EAAOC,GAAK9B,UAuBnCqB,EAAGM,SAASC,MAAM1B,WATE,SAAS2B,EAAQC,GACjC,OAZa,SAASC,GACtBT,EAAQU,aAAc,EACtB,IACI,MAAO,MAAQrD,EAAMsD,eAAeF,EAAOT,GAAW,OAE1D,MAAMY,GAEF,OADGZ,EAAQa,cAAeC,QAAQC,IAAIH,GAC/BH,GAKHQ,CAAWV,EAAOC,GAAK9B,SAAW","file":"m-it-katex.js","sourcesContent":["/* Process inline math */\n/*\nLike markdown-it-simplemath, this is a stripped down, simplified version of:\nhttps://github.com/runarberg/markdown-it-math\n\nIt differs in that it takes (a subset of) LaTeX as input and relies on KaTeX\nfor rendering output.\n*/\n\n/*jslint node: true */\n'use strict';\n\nvar katex = require('katex');\n\n// Test if potential opening or closing delimieter\n// Assumes that there is a \"$\" at state.src[pos]\nfunction isValidDelim(state, pos) {\n var prevChar, nextChar,\n max = state.posMax,\n can_open = true,\n can_close = true;\n\n prevChar = pos > 0 ? state.src.charCodeAt(pos - 1) : -1;\n nextChar = pos + 1 <= max ? state.src.charCodeAt(pos + 1) : -1;\n\n // Check non-whitespace conditions for opening and closing, and\n // check that closing delimeter isn't followed by a number\n if (prevChar === 0x20/* \" \" */ || prevChar === 0x09/* \\t */ ||\n (nextChar >= 0x30/* \"0\" */ && nextChar <= 0x39/* \"9\" */)) {\n can_close = false;\n }\n if (nextChar === 0x20/* \" \" */ || nextChar === 0x09/* \\t */) {\n can_open = false;\n }\n\n return {\n can_open: can_open,\n can_close: can_close\n };\n}\n\nfunction math_inline(state, silent) {\n var start, match, token, res, pos, esc_count;\n\n if (state.src[state.pos] !== \"$\") { return false; }\n\n res = isValidDelim(state, state.pos);\n if (!res.can_open) {\n if (!silent) { state.pending += \"$\"; }\n state.pos += 1;\n return true;\n }\n\n // First check for and bypass all properly escaped delimieters\n // This loop will assume that the first leading backtick can not\n // be the first character in state.src, which is known since\n // we have found an opening delimieter already.\n start = state.pos + 1;\n match = start;\n while ( (match = state.src.indexOf(\"$\", match)) !== -1) {\n // Found potential $, look for escapes, pos will point to\n // first non escape when complete\n pos = match - 1;\n while (state.src[pos] === \"\\\\\") { pos -= 1; }\n\n // Even number of escapes, potential closing delimiter found\n if ( ((match - pos) % 2) == 1 ) { break; }\n match += 1;\n }\n\n // No closing delimter found. Consume $ and continue.\n if (match === -1) {\n if (!silent) { state.pending += \"$\"; }\n state.pos = start;\n return true;\n }\n\n // Check if we have empty content, ie: $$. Do not parse.\n if (match - start === 0) {\n if (!silent) { state.pending += \"$$\"; }\n state.pos = start + 1;\n return true;\n }\n\n // Check for valid closing delimiter\n res = isValidDelim(state, match);\n if (!res.can_close) {\n if (!silent) { state.pending += \"$\"; }\n state.pos = start;\n return true;\n }\n\n if (!silent) {\n token = state.push('math_inline', 'math', 0);\n token.markup = \"$\";\n token.content = state.src.slice(start, match);\n }\n\n state.pos = match + 1;\n return true;\n}\n\nfunction math_block(state, start, end, silent){\n var firstLine, lastLine, next, lastPos, found = false, token,\n pos = state.bMarks[start] + state.tShift[start],\n max = state.eMarks[start]\n\n if(pos + 2 > max){ return false; }\n if(state.src.slice(pos,pos+2)!=='$$'){ return false; }\n\n pos += 2;\n firstLine = state.src.slice(pos,max);\n\n if(silent){ return true; }\n if(firstLine.trim().slice(-2)==='$$'){\n // Single line expression\n firstLine = firstLine.trim().slice(0, -2);\n found = true;\n }\n\n for(next = start; !found; ){\n\n next++;\n\n if(next >= end){ break; }\n\n pos = state.bMarks[next]+state.tShift[next];\n max = state.eMarks[next];\n\n if(pos < max && state.tShift[next] < state.blkIndent){\n // non-empty line with negative indent should stop the list:\n break;\n }\n\n if(state.src.slice(pos,max).trim().slice(-2)==='$$'){\n lastPos = state.src.slice(0,max).lastIndexOf('$$');\n lastLine = state.src.slice(pos,lastPos);\n found = true;\n }\n\n }\n\n state.line = next + 1;\n\n token = state.push('math_block', 'math', 0);\n token.block = true;\n token.content = (firstLine && firstLine.trim() ? firstLine + '\\n' : '')\n + state.getLines(start + 1, next, state.tShift[start], true)\n + (lastLine && lastLine.trim() ? lastLine : '');\n token.map = [ start, state.line ];\n token.markup = '$$';\n return true;\n}\n\nmodule.exports = function math_plugin(md, options) {\n // Default options\n\n options = options || {};\n\n // set KaTeX as the renderer for markdown-it-simplemath\n var katexInline = function(latex){\n options.displayMode = false;\n try{\n return katex.renderToString(latex, options);\n }\n catch(error){\n if(options.throwOnError){ console.log(error); }\n return latex;\n }\n };\n\n var inlineRenderer = function(tokens, idx){\n return katexInline(tokens[idx].content);\n };\n\n var katexBlock = function(latex){\n options.displayMode = true;\n try{\n return \"<p>\" + katex.renderToString(latex, options) + \"</p>\";\n }\n catch(error){\n if(options.throwOnError){ console.log(error); }\n return latex;\n }\n }\n\n var blockRenderer = function(tokens, idx){\n return katexBlock(tokens[idx].content) + '\\n';\n }\n\n md.inline.ruler.after('escape', 'math_inline', math_inline);\n md.block.ruler.after('blockquote', 'math_block', math_block, {\n alt: [ 'paragraph', 'reference', 'blockquote', 'list' ]\n });\n md.renderer.rules.math_inline = inlineRenderer;\n md.renderer.rules.math_block = blockRenderer;\n};\n"],"sourceRoot":""}
\ No newline at end of file
(window.webpackJsonpFileReadmeMD=window.webpackJsonpFileReadmeMD||[]).push([[3],{509:function(n,e){},511:function(n,e){},543:function(n,e){},544:function(n,e){},774:function(n,e,o){var i={"./locale":258,"./locale.js":258};function r(n){var e=t(n);return o(e)}function t(n){if(!o.o(i,n)){var e=new Error("Cannot find module '"+n+"'");throw e.code="MODULE_NOT_FOUND",e}return i[n]}r.keys=function(){return Object.keys(i)},r.resolve=t,n.exports=r,r.id=774}}]);
(window.webpackJsonpFileReadmeMD=window.webpackJsonpFileReadmeMD||[]).push([[3],{613:function(n,e){},615:function(n,e){},647:function(n,e){},648:function(n,e){},878:function(n,e,o){var i={"./locale":362,"./locale.js":362};function r(n){var e=t(n);return o(e)}function t(n){if(!o.o(i,n)){var e=new Error("Cannot find module '"+n+"'");throw e.code="MODULE_NOT_FOUND",e}return i[n]}r.keys=function(){return Object.keys(i)},r.resolve=t,n.exports=r,r.id=878}}]);
//# sourceMappingURL=m-it-mermaid.js.map
\ No newline at end of file
{"version":3,"sources":["webpack:///./node_modules/moment-mini/locale sync ^\\.\\/.*$"],"names":["map","webpackContext","req","id","webpackContextResolve","__webpack_require__","o","e","Error","code","keys","Object","resolve","module","exports"],"mappings":"qLAAA,IAAIA,EAAM,CACT,WAAY,IACZ,cAAe,KAIhB,SAASC,EAAeC,GACvB,IAAIC,EAAKC,EAAsBF,GAC/B,OAAOG,EAAoBF,GAE5B,SAASC,EAAsBF,GAC9B,IAAIG,EAAoBC,EAAEN,EAAKE,GAAM,CACpC,IAAIK,EAAI,IAAIC,MAAM,uBAAyBN,EAAM,KAEjD,MADAK,EAAEE,KAAO,mBACHF,EAEP,OAAOP,EAAIE,GAEZD,EAAeS,KAAO,WACrB,OAAOC,OAAOD,KAAKV,IAEpBC,EAAeW,QAAUR,EACzBS,EAAOC,QAAUb,EACjBA,EAAeE,GAAK","file":"m-it-mermaid.js","sourcesContent":["var map = {\n\t\"./locale\": 258,\n\t\"./locale.js\": 258\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 774;"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["webpack:///./node_modules/moment-mini/locale sync ^\\.\\/.*$"],"names":["map","webpackContext","req","id","webpackContextResolve","__webpack_require__","o","e","Error","code","keys","Object","resolve","module","exports"],"mappings":"qLAAA,IAAIA,EAAM,CACT,WAAY,IACZ,cAAe,KAIhB,SAASC,EAAeC,GACvB,IAAIC,EAAKC,EAAsBF,GAC/B,OAAOG,EAAoBF,GAE5B,SAASC,EAAsBF,GAC9B,IAAIG,EAAoBC,EAAEN,EAAKE,GAAM,CACpC,IAAIK,EAAI,IAAIC,MAAM,uBAAyBN,EAAM,KAEjD,MADAK,EAAEE,KAAO,mBACHF,EAEP,OAAOP,EAAIE,GAEZD,EAAeS,KAAO,WACrB,OAAOC,OAAOD,KAAKV,IAEpBC,EAAeW,QAAUR,EACzBS,EAAOC,QAAUb,EACjBA,EAAeE,GAAK","file":"m-it-mermaid.js","sourcesContent":["var map = {\n\t\"./locale\": 362,\n\t\"./locale.js\": 362\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 878;"],"sourceRoot":""}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment