mirror of
https://github.com/zhigang1992/docsify.git
synced 2026-04-23 21:00:06 +08:00
[build] 4.5.2
This commit is contained in:
@@ -2976,6 +2976,15 @@ Compiler.prototype._initRenderer = function _initRenderer () {
|
||||
return ("<img src=\"" + url + "\"data-origin=\"" + href + "\" alt=\"" + text + "\"" + attrs + ">")
|
||||
};
|
||||
|
||||
var CHECKED_RE = /^\[([ x])\] +/;
|
||||
origin.listitem = renderer.listitem = function (text) {
|
||||
var checked = CHECKED_RE.exec(text);
|
||||
if (checked) {
|
||||
text = text.replace(CHECKED_RE, ("<input type=\"checkbox\" " + (checked[1] === 'x' ? 'checked' : '') + " />"));
|
||||
}
|
||||
return ("<li>" + text + "</li>\n")
|
||||
};
|
||||
|
||||
renderer.origin = origin;
|
||||
|
||||
return renderer
|
||||
@@ -4054,7 +4063,7 @@ initGlobalAPI();
|
||||
/**
|
||||
* Version
|
||||
*/
|
||||
Docsify.version = '4.5.1';
|
||||
Docsify.version = '4.5.2';
|
||||
|
||||
/**
|
||||
* Run Docsify
|
||||
|
||||
Reference in New Issue
Block a user