gitit
gitit copied to clipboard
Fix for `pandoc-3.8`
Currently, building gitit with pandoc-3.8 fails with:
[12 of 21] Compiling Network.Gitit.ContentTransformer ( src/Network/Gitit/ContentTransformer.hs, dist/build/Network/Gitit/ContentTransformer.o, dist/build/Network/Gitit/ContentTransformer.dyn_o )
src/Network/Gitit/ContentTransformer.hs:523:25: error: [GHC-22385]
Not in scope: record field ‘writerHighlightStyle’
Suggested fix:
Perhaps use record field of WriterOptions ‘writerHighlightMethod’ (imported from Text.Pandoc)
|
523 | , writerHighlightStyle = Just pygments
| ^^^^^^^^^^^^^^^^^^^^
But, it is an easy fix.
This won't work for multiple pandoc versions unless you use CPP conditions in the code, so that the old API will be used for older pandoc versions.
#if MIN_VERSION_pandoc(3,8,0)
#else
#endif