[build] 4.7.1
This commit is contained in:
parent
393e4ec044
commit
8336769127
10 changed files with 19 additions and 20 deletions
|
|
@ -384,20 +384,19 @@ function cover() {
|
|||
* @return {String}
|
||||
*/
|
||||
function tree(toc, tpl) {
|
||||
if ( tpl === void 0 ) tpl = '';
|
||||
if ( tpl === void 0 ) tpl = '<ul class="app-sub-sidebar">{inner}</ul>';
|
||||
|
||||
if (!toc || !toc.length) {
|
||||
return ''
|
||||
}
|
||||
|
||||
var innerHTML = '';
|
||||
toc.forEach(function (node) {
|
||||
tpl += "<li><a class=\"section-link\" href=\"" + (node.slug) + "\">" + (node.title) + "</a></li>";
|
||||
innerHTML += "<li><a class=\"section-link\" href=\"" + (node.slug) + "\">" + (node.title) + "</a></li>";
|
||||
if (node.children) {
|
||||
tpl += "<li><ul class=\"children\">" + (tree(node.children)) + "</li></ul>";
|
||||
innerHTML += tree(node.children, tpl);
|
||||
}
|
||||
});
|
||||
|
||||
return tpl
|
||||
return tpl.replace('{inner}', innerHTML)
|
||||
}
|
||||
|
||||
function helper(className, content) {
|
||||
|
|
@ -610,7 +609,7 @@ var marked = createCommonjsModule(function (module, exports) {
|
|||
/**
|
||||
* marked - a markdown parser
|
||||
* Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed)
|
||||
* https://github.com/markedjs/marked
|
||||
* https://github.com/chjj/marked
|
||||
*/
|
||||
|
||||
(function() {
|
||||
|
|
@ -1866,7 +1865,7 @@ function marked(src, opt, callback) {
|
|||
if (opt) { opt = merge({}, marked.defaults, opt); }
|
||||
return Parser.parse(Lexer.lex(src, opt), opt);
|
||||
} catch (e) {
|
||||
e.message += '\nPlease report this to https://github.com/markedjs/marked.';
|
||||
e.message += '\nPlease report this to https://github.com/chjj/marked.';
|
||||
if ((opt || marked.defaults).silent) {
|
||||
return '<p>An error occurred:</p><pre>'
|
||||
+ escape(e.message + '', true)
|
||||
|
|
@ -3222,7 +3221,7 @@ Compiler.prototype.sidebar = function sidebar (text, level) {
|
|||
html = this.compile(text);
|
||||
} else {
|
||||
var tree$$1 = this.cacheTree[currentPath] || genTree(this.toc, level);
|
||||
html = tree(tree$$1, '<ul>');
|
||||
html = tree(tree$$1, '<ul>{inner}</ul>');
|
||||
this.cacheTree[currentPath] = tree$$1;
|
||||
}
|
||||
|
||||
|
|
@ -3253,7 +3252,7 @@ Compiler.prototype.subSidebar = function subSidebar (level) {
|
|||
|
||||
cacheTree[currentPath] = tree$$1;
|
||||
this.toc = [];
|
||||
return tree(tree$$1, '<ul class="app-sub-sidebar">')
|
||||
return tree(tree$$1)
|
||||
};
|
||||
|
||||
Compiler.prototype.article = function article (text) {
|
||||
|
|
@ -3351,7 +3350,7 @@ function getAndActive(router, el, isParent, autoTitle) {
|
|||
});
|
||||
|
||||
if (autoTitle) {
|
||||
$.title = target ? ((target.innerText) + " - " + title) : title;
|
||||
$.title = target ? (target.title || ((target.innerText) + " - " + title)) : title;
|
||||
}
|
||||
|
||||
return target
|
||||
|
|
@ -4601,7 +4600,7 @@ initGlobalAPI();
|
|||
/**
|
||||
* Version
|
||||
*/
|
||||
Docsify.version = '4.7.0';
|
||||
Docsify.version = '4.7.1';
|
||||
|
||||
/**
|
||||
* Run Docsify
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue