@@ -0,0 +1,20 @@
1+#!/usr/bin/env python
2+
3+"""
4+Pandoc filter to convert definition lists to bullet
5+lists with the defined terms in strong emphasis (for
6+compatibility with standard markdown).
7+"""
8+
9+from pandoc import toJSONFilter
10+
11+def deflists(key, value, format):
12+ if key == 'DefinitionList':
13+ return {'BulletList': [tobullet(t,d) for [t,d] in value]}
14+
15+def tobullet(term, defs):
16+ return [{'Para': [{'Strong': term}]}] + [b for d in defs for b in d]
17+
18+
19+if __name__ == "__main__":
20+ toJSONFilter(deflists)