diff --git a/docs/_coverpage.md b/docs/_coverpage.md index 5596933..26f7c8e 100644 --- a/docs/_coverpage.md +++ b/docs/_coverpage.md @@ -1,6 +1,6 @@ ![logo](_media/icon.svg) -# docsify 4.6.10 +# docsify 4.7.0 > A magical documentation site generator. diff --git a/lib/docsify.js b/lib/docsify.js index 233726f..24479f4 100644 --- a/lib/docsify.js +++ b/lib/docsify.js @@ -343,7 +343,9 @@ function main(config) { '' + ''; @@ -3120,7 +3122,7 @@ Compiler.prototype._initRenderer = function _initRenderer () { title = str; if ( - !/:|(\/{2})/.test(href) && + !isAbsolutePath(href) && !_self._matchNotCompileLink(href) && !config.ignore ) { @@ -3175,6 +3177,16 @@ Compiler.prototype._initRenderer = function _initRenderer () { attrs += " title=\"" + title + "\""; } + var size = config.size; + if (size) { + var sizes = size.split('x'); + if (sizes[1]) { + attrs += 'width=' + sizes[0] + ' height=' + sizes[1]; + } else { + attrs += 'width=' + sizes[0]; + } + } + if (!isAbsolutePath(href)) { url = getPath(contentBase, getParentPath(router.getCurrentPath()), href); } @@ -3208,7 +3220,6 @@ Compiler.prototype.sidebar = function sidebar (text, level) { if (text) { html = this.compile(text); - html = html && html.match(/]*>([\s\S]+)<\/ul>/g)[0]; } else { var tree$$1 = this.cacheTree[currentPath] || genTree(this.toc, level); html = tree(tree$$1, '