mirror of
https://github.com/wahyd4/docsify.git
synced 2026-08-09 05:16:06 +10:00
[build] 4.4.1
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||

|
||||
|
||||
# docsify <small>4.4.0</small>
|
||||
# docsify <small>4.4.1</small>
|
||||
|
||||
> A magical documentation site generator.
|
||||
|
||||
|
||||
+44
-18
@@ -2794,6 +2794,22 @@ var cleanPath = cached(function (path) {
|
||||
});
|
||||
|
||||
var cachedLinks = {};
|
||||
function getAndRemoveConfig (str) {
|
||||
if ( str === void 0 ) str = '';
|
||||
|
||||
var config = {};
|
||||
|
||||
if (str) {
|
||||
str = str
|
||||
.replace(/:([\w-]+)=?([\w-]+)?/g, function (m, key, value) {
|
||||
config[key] = value || true;
|
||||
return ''
|
||||
})
|
||||
.trim();
|
||||
}
|
||||
|
||||
return { str: str, config: config }
|
||||
}
|
||||
|
||||
var Compiler = function Compiler (config, router) {
|
||||
this.config = config;
|
||||
@@ -2894,16 +2910,11 @@ Compiler.prototype._initRenderer = function _initRenderer () {
|
||||
if ( title === void 0 ) title = '';
|
||||
|
||||
var attrs = '';
|
||||
var config = {};
|
||||
|
||||
if (title) {
|
||||
title = title
|
||||
.replace(/:(\w+)=?(\w+)?/g, function (m, key, value) {
|
||||
config[key] = value || true;
|
||||
return ''
|
||||
})
|
||||
.trim();
|
||||
}
|
||||
var ref = getAndRemoveConfig(title);
|
||||
var str = ref.str;
|
||||
var config = ref.config;
|
||||
title = str;
|
||||
|
||||
if (
|
||||
!/:|(\/{2})/.test(href) &&
|
||||
@@ -2925,9 +2936,10 @@ Compiler.prototype._initRenderer = function _initRenderer () {
|
||||
}
|
||||
|
||||
if (title) {
|
||||
title = " title=\"" + title + "\"";
|
||||
attrs += " title=\"" + title + "\"";
|
||||
}
|
||||
return ("<a href=\"" + href + "\"" + (title || '') + attrs + ">" + text + "</a>")
|
||||
|
||||
return ("<a href=\"" + href + "\"" + attrs + ">" + text + "</a>")
|
||||
};
|
||||
origin.paragraph = renderer.paragraph = function (text) {
|
||||
if (/^!>/.test(text)) {
|
||||
@@ -2939,13 +2951,26 @@ Compiler.prototype._initRenderer = function _initRenderer () {
|
||||
};
|
||||
origin.image = renderer.image = function (href, title, text) {
|
||||
var url = href;
|
||||
var titleHTML = title ? (" title=\"" + title + "\"") : '';
|
||||
var attrs = '';
|
||||
|
||||
var ref = getAndRemoveConfig(title);
|
||||
var str = ref.str;
|
||||
var config = ref.config;
|
||||
title = str;
|
||||
|
||||
if (config['no-zoom']) {
|
||||
attrs += ' data-no-zoom';
|
||||
}
|
||||
|
||||
if (title) {
|
||||
attrs += " title=\"" + title + "\"";
|
||||
}
|
||||
|
||||
if (!isAbsolutePath(href)) {
|
||||
url = getPath(contentBase, href);
|
||||
}
|
||||
|
||||
return ("<img src=\"" + url + "\" data-origin=\"" + href + "\" alt=\"" + text + "\"" + titleHTML + ">")
|
||||
return ("<img src=\"" + url + "\"data-origin=\"" + href + "\" alt=\"" + text + "\"" + attrs + ">")
|
||||
};
|
||||
|
||||
renderer.origin = origin;
|
||||
@@ -2985,11 +3010,12 @@ Compiler.prototype.subSidebar = function subSidebar (level) {
|
||||
var cacheTree = ref.cacheTree;
|
||||
var toc = ref.toc;
|
||||
|
||||
toc[0] && toc[0].ignoreAllSubs && (this.toc = []);
|
||||
toc[0] && toc[0].ignoreAllSubs && toc.splice(0);
|
||||
toc[0] && toc[0].level === 1 && toc.shift();
|
||||
toc.forEach(function (node, i) {
|
||||
node.ignoreSubHeading && toc.splice(i, 1);
|
||||
});
|
||||
|
||||
for (var i = 0; i < toc.length; i++) {
|
||||
toc[i].ignoreSubHeading && toc.splice(i, 1) && i--;
|
||||
}
|
||||
|
||||
var tree$$1 = cacheTree[currentPath] || genTree(toc, level);
|
||||
|
||||
@@ -4010,7 +4036,7 @@ initGlobalAPI();
|
||||
/**
|
||||
* Version
|
||||
*/
|
||||
Docsify.version = '4.4.0';
|
||||
Docsify.version = '4.4.1';
|
||||
|
||||
/**
|
||||
* Run Docsify
|
||||
|
||||
Vendored
+2
-2
File diff suppressed because one or more lines are too long
+11
-288
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -37,5 +37,5 @@
|
||||
"integrity": "sha1-6DWIAbhrg7F1YNTjw4LXrvIQCUQ="
|
||||
}
|
||||
},
|
||||
"version": "4.4.0"
|
||||
"version": "4.4.1"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "docsify-server-renderer",
|
||||
"version": "4.4.0",
|
||||
"version": "4.4.1",
|
||||
"description": "docsify server renderer",
|
||||
"author": {
|
||||
"name": "qingwei-li",
|
||||
|
||||
Reference in New Issue
Block a user