pandoc-types icon indicating copy to clipboard operation
pandoc-types copied to clipboard

Improve Walk

Open jgm opened this issue 3 years ago • 2 comments

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.

jgm avatar Mar 12 '21 19:03 jgm

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

mikasiddiqui avatar Apr 21 '24 03:04 mikasiddiqui

This worked for me, thanks @mikasiddiqui .

mtworth avatar May 27 '24 16:05 mtworth