pandoc-types
pandoc-types copied to clipboard
Improve Walk
Walk is a bit of a mess. It seems we should be able to do something more elegant, using recursion schemes or something.
For motivation see jgm/pandoc#7130.
Here we have walk fixLinks
where fixLinks
is [Inline] -> [Inline]
.
It works fine if applied to [Inline]
. However, it behaves differently if you apply it to Inlines
. Seems like instead of having instances specifically for lists, we should have general instances that work for all Traversable/Foldable structures, including Many.
That's because you're most likely using it within a jupyter notebook - try adding this to the start of your code:
import nest_asyncio
nest_asyncio.apply()
Make sure to pip install it before importing
This worked for me, thanks @mikasiddiqui .