Closed pbodnar closed 11 months ago
@allets, @anderskaplan, this PR follows the discussions from #197, provided you would like to give feedback. If no one protests in a few days, I would merge this to the master. :)
lgtm! just one thought about the naming of the flag, which is now very specfic. I believe that there are basically two modes you might want to run the Markdown renderer in: either you want it to stay as faithful to the original as possible, or you want the generated Markdown to be as regular (normalized) as possible. I can imagine that other options like this one will come, and maybe it's better to bundle them together with a single "normalize whitespace" option.
@anderskaplan, thanks for your feedback. So I would rename the flag to normalize_whitespace
, with an outlook that we can gradually take this flag into account in more places of the renderer, right? I haven't studied the renderer thoroughly... :P
@anderskaplan, thanks for your feedback. So I would rename the flag to
normalize_whitespace
, with an outlook that we can gradually take this flag into account in more places of the renderer, right? I haven't studied the renderer thoroughly... :P
yes exactly!
yes exactly!
OK, so I've generalized the newly introduced option. Hopefully fine now? :)
@pbodnar, good! Thanks for your commit that fixed my omission. I like the idea of the generalization. It works fine.
This follows #197 and adds the possibility to switch ON the original renderer behavior when the space after list marker (called leader in mistletoe) collapsed just to 1 space.