gjtorikian / html-pipeline

HTML processing filters and utilities
MIT License
2.27k stars 380 forks source link

Changing the list of commonmarker extensions with custom renderer is broken #321

Closed hannesfostie closed 4 years ago

hannesfostie commented 4 years ago

Hey,

A while back @gjtorikian assisted in allowing us to choose a custom renderer for the MarkdownFilter. He also explained how to remove extensions (in our case, tagfilter).

I just discovered that when using these features together, tagfilter is not properly removed.

I added a working and a broken test for this in my branch https://github.com/hannesfostie/html-pipeline/tree/hf/extensions-issue

I'll spend a bit longer to try and figure this out but wanted to create the issue since you're much more familiar with the code, just in case you immediately knew where to look. If I find a solution I'll share it here and create a proper PR for it.

gjtorikian commented 4 years ago

My mistake here--I forgot to pass unsafe as an option along with the renderer, too 🤦‍♂ 4e997bfa7975d917c445bd99cd1949a108604423

hannesfostie commented 4 years ago

Aha! That makes perfect sense. Thank you!