Pandoc filter to convert HTML comments to LaTeX todos 

Ta-da! Here's my pandoc filter to convert inline HTML comments <!-- like this --> to LaTeX todos for use with the todonotes package:
gist.github.com/minkkinen/0d58

Based on about 2 minutes of testing, it seems to work 😀
This should really help when printing out drafts with comments all over the place.

Pandoc filter to convert HTML comments to LaTeX todos 

@mmin
I think that you need to change `re.search` to either `re.findall` or `re.finditer`, as `re.search` only deals with the first match found, rather than all matches.

docs.python.org/3.5/library/re

Follow

Pandoc filter to convert HTML comments to LaTeX todos 

@mmin
This is an interesting project, though. Thanks for sharing it! I'm fascinated by the panflute package that you used, and I hadn't heard of it before now.

Sign in to participate in the conversation
Scholar Social

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!