aboutsummaryrefslogtreecommitdiff
path: root/scripts/deemph.py
blob: 467641b4a12a5374725c49cdefc370a34eaf035f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env python
from pandoc import walk, toJSONFilter
from caps import caps

"""Pandoc filter that causes emphasized text to be displayed
in ALL CAPS.
"""

def deemph(key, val, fmt):
  if key == 'Emph':
    return walk(val, caps, fmt)

if __name__ == "__main__":
  toJSONFilter(deemph)