dae/anki — pull request #33 by vterron (2013-06-06 11:17:48+00:00)
Title: Unused Media: take into account images referenced from templates

When removing unused media, Anki only pays attention to whether the files in the media directory are referenced from a note. However, it may be the case that a file is solely referenced from a template. For example, if we wanted to ask the user to locate a state on a US map, our Front Template could look like this:

{{StateName}}

![front](https://f.cloud.github.com/assets/1575425/617564/355889ce-ce99-11e2-90b1-2381c1eb15bd.png)

And the Back Template could be:

{{StateLocation}}

{{StateName}}

![back](https://f.cloud.github.com/assets/1575425/617565/3ed921f2-ce99-11e2-9d8c-6c7caf3bee43.png)

The image ``empty-us-map.jpg``, if not referenced from any note, is reported by Anki as unused. Modify ``MediaManager.allMedia()`` so that it also returns those images referenced (HTML \ tags) from templates.