()
| 32 | } |
| 33 | |
| 34 | initPlugin() { |
| 35 | [].concat(this.config.plugins).forEach(fn => { |
| 36 | try { |
| 37 | isFn(fn) && fn(this._lifecycle, this); |
| 38 | } catch (err) { |
| 39 | if (this.config.catchPluginErrors) { |
| 40 | const errTitle = 'Docsify plugin error'; |
| 41 | console.error(errTitle, err); |
| 42 | } else { |
| 43 | throw err; |
| 44 | } |
| 45 | } |
| 46 | }); |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | /** |