postRenderAsyncJobs doesn't work in watch mode
Closed this issue · 2 comments
xixixao commented
What package is the bug related to?
typedoc-plugin-markdown
Describe the issue
When running npx typedoc --watch
the postRenderAsyncJobs
only executes once. It should run after each render.
TypeDoc configuration
No response
Expected behavior
No response
tgreyuk commented
As is the case for html theme, postRenderAsyncJobs are intentionally cleared after the first render so won't trigger after each change in watch node.
As a workaround I suppose you can re-assign the jobs after each render:
const postAsyncJobs = () => {
app.renderer.postRenderAsyncJobs.push(async (output) => {
// do something after render
});
};
// initial
postAsyncJobs();
// set after each subsequent render
app.renderer.on(MarkdownRendererEvent.END, () => {
postAsyncJobs();
});
xixixao commented
Thanks, would be nice to document this in docs!