Commit e585e22a authored by Matthieu Le Corre's avatar Matthieu Le Corre
Browse files

Massive lint ans jquery removal


Signed-off-by: Matthieu Le Corre's avatarMatthieu Le Corre <matthieu.lecorre@univ-nantes.fr>
parent a0e05f80
module.exports = {
extends: [
'@nextcloud',
"plugin:nextcloud/recommended"
],
}
\ No newline at end of file
{
"processors": ["stylelint-processor-html"],
"extends": "stylelint-config-standard",
"rules": {
'no-empty-source': true
}
}
\ No newline at end of file
## 1.2.0 XX-10-2020
### Fixed
### Added
- Checkboxs are now readonly to avoid confusion
[#59](https://gitlab.univ-nantes.fr/uncloud/files_readmemd/issues/59#)
- Hyperlinks in Footer or Header are now opened within a new tab
[#56](https://gitlab.univ-nantes.fr/uncloud/files_readmemd/issues/56#)
- NextCloud 19 & 20 compatibility
### Changed
- Massive JS lint
- Remove all Jquery calls
## 1.1.4 10-04-2020
### Fixed
- Incorrect file name displayed
......
......@@ -7,7 +7,7 @@
With this app you can add a header and a footer to your nextcloud directories.
This can be use to explain the goal of a directory, describe the content of a folder ...
It show README.md in the way gitlab does.]]></description>
<version>1.1.4</version>
<version>1.1.5</version>
<licence>agpl</licence>
<author mail="matthieu.lecorre@univ-nantes.fr" homepage="http://www.univ-nantes.fr">Matthieu Le Corre</author>
<namespace>ReadmeMD</namespace>
......@@ -19,7 +19,7 @@ It show README.md in the way gitlab does.]]></description>
<bugs>https://gitlab.univ-nantes.fr/uncloud/files_readmemd/issues</bugs>
<screenshot>https://gitlab.univ-nantes.fr/uncloud/files_readmemd/raw/master/screenshot.png</screenshot>
<dependencies>
<nextcloud min-version="16" max-version="18"/>
<nextcloud min-version="18" max-version="20"/>
</dependencies>
<settings>
<admin>OCA\ReadmeMD\Settings\Admin\Appareance</admin>
......
(window["webpackJsonpFileReadmeMD"] = window["webpackJsonpFileReadmeMD"] || []).push([["m-it-katex"],{
/***/ "./node_modules/markdown-it-katex/index.js":
/*!*************************************************!*\
!*** ./node_modules/markdown-it-katex/index.js ***!
\*************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* Process inline math */
/*
Like markdown-it-simplemath, this is a stripped down, simplified version of:
https://github.com/runarberg/markdown-it-math
It differs in that it takes (a subset of) LaTeX as input and relies on KaTeX
for rendering output.
*/
/*jslint node: true */
var katex = __webpack_require__(/*! katex */ "./node_modules/katex/katex.js");
// Test if potential opening or closing delimieter
// Assumes that there is a "$" at state.src[pos]
function isValidDelim(state, pos) {
var prevChar, nextChar,
max = state.posMax,
can_open = true,
can_close = true;
prevChar = pos > 0 ? state.src.charCodeAt(pos - 1) : -1;
nextChar = pos + 1 <= max ? state.src.charCodeAt(pos + 1) : -1;
// Check non-whitespace conditions for opening and closing, and
// check that closing delimeter isn't followed by a number
if (prevChar === 0x20/* " " */ || prevChar === 0x09/* \t */ ||
(nextChar >= 0x30/* "0" */ && nextChar <= 0x39/* "9" */)) {
can_close = false;
}
if (nextChar === 0x20/* " " */ || nextChar === 0x09/* \t */) {
can_open = false;
}
return {
can_open: can_open,
can_close: can_close
};
}
function math_inline(state, silent) {
var start, match, token, res, pos, esc_count;
if (state.src[state.pos] !== "$") { return false; }
res = isValidDelim(state, state.pos);
if (!res.can_open) {
if (!silent) { state.pending += "$"; }
state.pos += 1;
return true;
}
// First check for and bypass all properly escaped delimieters
// This loop will assume that the first leading backtick can not
// be the first character in state.src, which is known since
// we have found an opening delimieter already.
start = state.pos + 1;
match = start;
while ( (match = state.src.indexOf("$", match)) !== -1) {
// Found potential $, look for escapes, pos will point to
// first non escape when complete
pos = match - 1;
while (state.src[pos] === "\\") { pos -= 1; }
// Even number of escapes, potential closing delimiter found
if ( ((match - pos) % 2) == 1 ) { break; }
match += 1;
}
// No closing delimter found. Consume $ and continue.
if (match === -1) {
if (!silent) { state.pending += "$"; }
state.pos = start;
return true;
}
// Check if we have empty content, ie: $$. Do not parse.
if (match - start === 0) {
if (!silent) { state.pending += "$$"; }
state.pos = start + 1;
return true;
}
// Check for valid closing delimiter
res = isValidDelim(state, match);
if (!res.can_close) {
if (!silent) { state.pending += "$"; }
state.pos = start;
return true;
}
if (!silent) {
token = state.push('math_inline', 'math', 0);
token.markup = "$";
token.content = state.src.slice(start, match);
}
state.pos = match + 1;
return true;
}
function math_block(state, start, end, silent){
var firstLine, lastLine, next, lastPos, found = false, token,
pos = state.bMarks[start] + state.tShift[start],
max = state.eMarks[start]
if(pos + 2 > max){ return false; }
if(state.src.slice(pos,pos+2)!=='$$'){ return false; }
pos += 2;
firstLine = state.src.slice(pos,max);
if(silent){ return true; }
if(firstLine.trim().slice(-2)==='$$'){
// Single line expression
firstLine = firstLine.trim().slice(0, -2);
found = true;
}
for(next = start; !found; ){
next++;
if(next >= end){ break; }
pos = state.bMarks[next]+state.tShift[next];
max = state.eMarks[next];
if(pos < max && state.tShift[next] < state.blkIndent){
// non-empty line with negative indent should stop the list:
break;
}
if(state.src.slice(pos,max).trim().slice(-2)==='$$'){
lastPos = state.src.slice(0,max).lastIndexOf('$$');
lastLine = state.src.slice(pos,lastPos);
found = true;
}
}
state.line = next + 1;
token = state.push('math_block', 'math', 0);
token.block = true;
token.content = (firstLine && firstLine.trim() ? firstLine + '\n' : '')
+ state.getLines(start + 1, next, state.tShift[start], true)
+ (lastLine && lastLine.trim() ? lastLine : '');
token.map = [ start, state.line ];
token.markup = '$$';
return true;
}
module.exports = function math_plugin(md, options) {
// Default options
options = options || {};
// set KaTeX as the renderer for markdown-it-simplemath
var katexInline = function(latex){
options.displayMode = false;
try{
return katex.renderToString(latex, options);
}
catch(error){
if(options.throwOnError){ console.log(error); }
return latex;
}
};
var inlineRenderer = function(tokens, idx){
return katexInline(tokens[idx].content);
};
var katexBlock = function(latex){
options.displayMode = true;
try{
return "<p>" + katex.renderToString(latex, options) + "</p>";
}
catch(error){
if(options.throwOnError){ console.log(error); }
return latex;
}
}
var blockRenderer = function(tokens, idx){
return katexBlock(tokens[idx].content) + '\n';
}
md.inline.ruler.after('escape', 'math_inline', math_inline);
md.block.ruler.after('blockquote', 'math_block', math_block, {
alt: [ 'paragraph', 'reference', 'blockquote', 'list' ]
});
md.renderer.rules.math_inline = inlineRenderer;
md.renderer.rules.math_block = blockRenderer;
};
/***/ })
}]);
//# sourceMappingURL=m-it-katex.js.map
\ No newline at end of file
{"version":3,"file":"chunks/m-it-katex.js","sources":["webpack:///./node_modules/markdown-it-katex/index.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"],"mappings":";;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;A","sourceRoot":""}
\ No newline at end of file
(window["webpackJsonpFileReadmeMD"] = window["webpackJsonpFileReadmeMD"] || []).push([["m-it-mermaid"],{
/***/ "./node_modules/moment-mini/locale sync recursive ^\\.\\/.*$":
/*!*******************************************************!*\
!*** ./node_modules/moment-mini/locale sync ^\.\/.*$ ***!
\*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
var map = {
"./locale": "./node_modules/moment-mini/locale/locale.js",
"./locale.js": "./node_modules/moment-mini/locale/locale.js"
};
function webpackContext(req) {
var id = webpackContextResolve(req);
return __webpack_require__(id);
}
function webpackContextResolve(req) {
if(!__webpack_require__.o(map, req)) {
var e = new Error("Cannot find module '" + req + "'");
e.code = 'MODULE_NOT_FOUND';
throw e;
}
return map[req];
}
webpackContext.keys = function webpackContextKeys() {
return Object.keys(map);
};
webpackContext.resolve = webpackContextResolve;
module.exports = webpackContext;
webpackContext.id = "./node_modules/moment-mini/locale sync recursive ^\\.\\/.*$";
/***/ }),
/***/ 0:
/*!**********************!*\
!*** util (ignored) ***!
\**********************/
/*! no static exports found */
/***/ (function(module, exports) {
/* (ignored) */
/***/ }),
/***/ 1:
/*!**********************!*\
!*** util (ignored) ***!
\**********************/
/*! no static exports found */
/***/ (function(module, exports) {
/* (ignored) */
/***/ }),
/***/ 10:
/*!************************!*\
!*** buffer (ignored) ***!
\************************/
/*! no static exports found */
/***/ (function(module, exports) {
/* (ignored) */
/***/ }),
/***/ 11:
/*!************************!*\
!*** buffer (ignored) ***!
\************************/
/*! no static exports found */
/***/ (function(module, exports) {
/* (ignored) */
/***/ }),
/***/ 12:
/*!************************!*\
!*** buffer (ignored) ***!
\************************/
/*! no static exports found */
/***/ (function(module, exports) {
/* (ignored) */
/***/ }),
/***/ 13:
/*!************************!*\
!*** buffer (ignored) ***!
\************************/
/*! no static exports found */
/***/ (function(module, exports) {
/* (ignored) */
/***/ }),
/***/ 14:
/*!************************!*\
!*** buffer (ignored) ***!
\************************/
/*! no static exports found */
/***/ (function(module, exports) {
/* (ignored) */
/***/ }),
/***/ 2:
/*!**********************!*\
!*** util (ignored) ***!
\**********************/
/*! no static exports found */
/***/ (function(module, exports) {
/* (ignored) */
/***/ }),
/***/ 3:
/*!**********************!*\
!*** util (ignored) ***!
\**********************/
/*! no static exports found */
/***/ (function(module, exports) {
/* (ignored) */
/***/ }),
/***/ 4:
/*!************************!*\
!*** buffer (ignored) ***!
\************************/
/*! no static exports found */
/***/ (function(module, exports) {
/* (ignored) */
/***/ }),
/***/ 5:
/*!************************!*\
!*** buffer (ignored) ***!
\************************/
/*! no static exports found */
/***/ (function(module, exports) {
/* (ignored) */
/***/ }),
/***/ 6:
/*!************************!*\
!*** crypto (ignored) ***!
\************************/
/*! no static exports found */
/***/ (function(module, exports) {
/* (ignored) */
/***/ }),
/***/ 7:
/*!**********************!*\
!*** util (ignored) ***!
\**********************/
/*! no static exports found */
/***/ (function(module, exports) {
/* (ignored) */
/***/ }),
/***/ 8:
/*!**********************!*\
!*** util (ignored) ***!
\**********************/
/*! no static exports found */
/***/ (function(module, exports) {
/* (ignored) */
/***/ }),
/***/ 9:
/*!************************!*\
!*** buffer (ignored) ***!
\************************/
/*! no static exports found */
/***/ (function(module, exports) {
/* (ignored) */
/***/ })
}]);
//# sourceMappingURL=m-it-mermaid.js.map
\ No newline at end of file
{"version":3,"file":"chunks/m-it-mermaid.js","sources":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A","sourceRoot":""}
\ No newline at end of file
This diff is collapsed.
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 source diff could not be displayed because it is too large. You can view the blob instead.
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