Replies: 3 comments 1 reply
-
I guess the thing to do would be to look at the Text.Pandoc.Writers.ChunkedHTML module and see how much of it is HTML-specific. It's possible that we could abstract out a higher-order function into which specific writer functions could be plugged, to yield a "chunked" version. |
Beta Was this translation helpful? Give feedback.
-
There is also Text.Pandoc.Chunks that seems more generic: https://github.com/jgm/pandoc/blob/main/src/Text/Pandoc/Chunks.hs |
Beta Was this translation helpful? Give feedback.
-
Yes, that is generic, and T.P.Writers.ChunkedHTML uses it. That's why T.P.Writers.ChunkedHTML will show what else needs to be done for a writer, beyond chunking. |
Beta Was this translation helpful? Give feedback.
-
For HTML / EPub, there is an internal chunking mechanism to split a single document to multiple outputs. There are cases where it would be useful for output formats other than HTML (tools that require multiple files for chapters). For example split a single markdown document to multiple markdown files:
Chapter links would get modified to include the
file.md#id
and reference links would be converted to inline. I don't know how feasible this is (depending where the chunking code sits in the processing chain) but as the problems are already solved for EPub, I would hope this is just about making the existing code accessible to other writers?Beta Was this translation helpful? Give feedback.
All reactions