dokuwiki-plugin-struct
dokuwiki-plugin-struct copied to clipboard
Fix dw2pdf multipage struct output
When the dw2pdf plugin is used to export multiple pages in a single document, all the pages are rendered in a single instance of syntax_plugin_struct_output. We want to allow this usecase and only skip repeated calls for non-dw2pdf renderings.
In conjunction with splitbrain/dokuwiki-plugin-dw2pdf#435 this fixes the struct data output in multi-page PDFs.
The whole mechanism of automatically outputting struct data on pages is somewhat fragile and depending on many variables, thus I'd be hesitant to just merge this. It should at least be accompanied by unit tests, not only for the functionality here but also for all scenarios in which output is automatically added or should not be added (like in includes, sidebars, etc).