lint compliance

pull/1/head
yflory 4 years ago
parent bacd0c18d5
commit 81cb7d2bb3

@ -15,6 +15,7 @@ www/common/onlyoffice/v2*
server.js server.js
www/common/old-media-tag.js www/common/old-media-tag.js
www/scratch www/scratch
www/lib
www/common/toolbar.js www/common/toolbar.js
www/common/hyperscript.js www/common/hyperscript.js

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -12,8 +12,7 @@ define([
'/bower_components/diff-dom/diffDOM.js', '/bower_components/diff-dom/diffDOM.js',
'/bower_components/tweetnacl/nacl-fast.min.js', '/bower_components/tweetnacl/nacl-fast.min.js',
'css!/common/highlight/styles/github.css' 'css!/common/highlight/styles/github.css'
],function ($, ApiConfig, Marked, Hash, Util, h, MT, MediaTag, Highlight, Messages, ],function ($, ApiConfig, Marked, Hash, Util, h, MT, MediaTag, Highlight, Messages) {
MarkMapTransform, Markmap) {
var DiffMd = {}; var DiffMd = {};
var DiffDOM = window.diffDOM; var DiffDOM = window.diffDOM;
@ -119,7 +118,7 @@ define([
} else if (language === 'markmap') { } else if (language === 'markmap') {
return '<pre class="markmap" data-plugin="markmap">'+Util.fixHTML(code)+'</pre>'; return '<pre class="markmap" data-plugin="markmap">'+Util.fixHTML(code)+'</pre>';
} else if (language === 'mathjax') { } else if (language === 'mathjax') {
var svg = Mathjax.tex2svg(code, {display: true}) var svg = Mathjax.tex2svg(code, {display: true});
if (!svg) { return ''; } if (!svg) { return ''; }
return '<pre class="mathjax">'+ svg.innerHTML.replace(/xlink:href/g, "href") +'</pre>'; return '<pre class="mathjax">'+ svg.innerHTML.replace(/xlink:href/g, "href") +'</pre>';
} else { } else {
@ -380,7 +379,7 @@ define([
var observer = new MutationObserver(function(mutations) { var observer = new MutationObserver(function(mutations) {
mutations.forEach(function(mutation) { mutations.forEach(function(mutation) {
if (mutation.type === 'childList') { if (mutation.type === 'childList') {
var n, $a; var n;
for (var i = 0; i < mutation.addedNodes.length; i++) { for (var i = 0; i < mutation.addedNodes.length; i++) {
n = mutation.addedNodes[i]; n = mutation.addedNodes[i];
if (n.nodeName === "A") { return void n.addEventListener('click', onClick); } if (n.nodeName === "A") { return void n.addEventListener('click', onClick); }
@ -400,8 +399,8 @@ define([
attr: 'markmap-source', attr: 'markmap-source',
render: function ($el) { render: function ($el) {
var data = MarkMapTransform.transform($el[0].getAttribute("markmap-source")); var data = MarkMapTransform.transform($el[0].getAttribute("markmap-source"));
$el[0].innerHTML = "<svg width='100%' height='600'/>" $el[0].innerHTML = "<svg width='100%' height='600'/>";
Markmap.markmap($el[0].firstChild, data) Markmap.markmap($el[0].firstChild, data);
fixMathjaxClickables($el); fixMathjaxClickables($el);
} }
}; };
@ -516,7 +515,6 @@ define([
// If the element is a mermaid or markmap svg, get the corresponding attribute // If the element is a mermaid or markmap svg, get the corresponding attribute
var isSvg = $mt.is('pre[data-plugin]'); var isSvg = $mt.is('pre[data-plugin]');
var plugin = isSvg && plugins[$mt.attr('data-plugin')]; var plugin = isSvg && plugins[$mt.attr('data-plugin')];
console.log(plugin);
// Get initial idx // Get initial idx
var idx = -1; var idx = -1;

Loading…
Cancel
Save