John MacFarlane
John MacFarlane
I figured that most types that represent some kind of textual output would have a Show instance. Is there a good reason why your type doesn't?
Would it be hard to wrap it in a newtype and define a dummy Show instance for that?
Oh yes, that's true. There are certain places where we need to downshift some inline content to plain text (e.g. in generating alt tags for images).
Looking more closely: in core commonmark, `toPlainText` is only used in SourceMap and in Html. So you shouldn't have a problem there. In commonmark-extensions, as you note, it's used for...
@tsonzero > Would it be possible for the parser to keep track of the parsed plain text, to avoid needing to pull it back out of the result type? It's...
Anything that involves a change to the pandoc AST is very involved. Changes would be required not just to pandoc-types, but to the majority of modules in pandoc. We are...
I'd consider a syntax extension for `==` in commonmark-extensions -- since this is started to get wider support -- but the pandoc change would be more controversial.
There is no commonmark renderer in this library. The library does, however, track source positions of everything. You could use that to delete sections from the original file if you...
## What I've tried - rewriting to operate directly on Text instead of tokenizing first - rewriting to operate directly on Text, using megaparsec instead of parsec, and using the...
For a 1.4MB file: