File: deemph.py

package info (click to toggle)
python-pandocfilters 1.5.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 376 kB
  • sloc: python: 802; makefile: 26
file content (16 lines) | stat: -rwxr-xr-x 322 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env python3
from pandocfilters import walk, toJSONFilter
from caps import caps

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


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

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