aboutsummaryrefslogtreecommitdiff
path: root/scripts/deemph.py
blob: f69dac5b8f98c86970f42d5e8e0c86d659b1a241 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/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)