Closed
Description
Async afterEach
hooks such as:
$docsify.plugins = [].concat(install, $docsify.plugins)
function install (hook, vm) {
hook.afterEach(function (html, next) {
setTimeout(function () {
next(html)
}, 1000)
})
}
breaking doneEach
events dependent plugins, such as zoom-image.
Demo:
https://docsify-pagination-issue-1-nzhdhlzryc.now.sh/#/
Source of demo:
https://docsify-pagination-issue-1-nzhdhlzryc.now.sh/_src
(Came from imyelo/docsify-pagination#1)
I guess the next
function in this place should run after callback
:
https://github.com/QingWei-Li/docsify/blob/e5a263f1bb0909e1629abf76e327f7f2b50340d8/src/core/render/index.js#L149
For the current version, however, if callback
is an asynchronous function, this assumption will be broken.