[build] 4.7.1

This commit is contained in:
Qingwei Li 2018-08-30 12:09:24 +08:00
commit 8336769127
10 changed files with 19 additions and 20 deletions

View file

@ -1,6 +1,6 @@
![logo](_media/icon.svg)
# docsify <small>4.7.0</small>
# docsify <small>4.7.1</small>
> A magical documentation site generator.

View file

@ -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

2
lib/docsify.min.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -37,5 +37,5 @@
"integrity": "sha1-6DWIAbhrg7F1YNTjw4LXrvIQCUQ="
}
},
"version": "4.7.0"
"version": "4.7.1"
}

View file

@ -1,6 +1,6 @@
{
"name": "docsify-server-renderer",
"version": "4.7.0",
"version": "4.7.1",
"description": "docsify server renderer",
"author": {
"name": "qingwei-li",

View file