Haskell library use, Markdown: can't use --preserve-tabs, readerTabStop=0 crashes
Closed this issue · 1 comments
someodd commented
I want to use --preserve-tabs
, but I'm actually using the Haskell library. I noticed that there's no real way to do this in the Markdown module and if I set readerTabStop
to 0 it will just crash:
bore: gobbleAtMostSpaces called with negative number
CallStack (from HasCallStack):
error, called at src/Text/Pandoc/Parsing/General.hs:385:17 in pandoc-3.1.11.1-8eMMtvAA4Qa2jqmuWSgN6Q:Text.Pandoc.Parsing.General
jgm commented
This is implemented here:
https://github.com/jgm/pandoc/blob/main/src/Text/Pandoc/App/Input.hs#L48-L59
If this option is set, then we call the tabFilter
function. You can do that in the Haskell program that is using the pandoc library.
If you're not manually using tabFilter
, then in effect you are already preserving tabs -- the markdown reader doesn't strip out tabs.