aboutsummaryrefslogtreecommitdiff
path: root/scripts/deemph.py
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2013-08-14 11:48:04 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2013-08-14 11:48:04 -0700
commit96c2d542977e5cc510f315aad7c2ee357fe988c9 (patch)
tree3504b8c875f107ec4c03fbba03f48b39a380cb6c /scripts/deemph.py
parentf6b5735d095dcfe2b0ef4aab02ff85acb47140c6 (diff)
downloadpandoc-96c2d542977e5cc510f315aad7c2ee357fe988c9.tar.gz
Commented python modules/sample scripts.
Diffstat (limited to 'scripts/deemph.py')
-rwxr-xr-xscripts/deemph.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/deemph.py b/scripts/deemph.py
index c1d532969..467641b4a 100755
--- a/scripts/deemph.py
+++ b/scripts/deemph.py
@@ -2,9 +2,13 @@
from pandoc import walk, toJSONFilter
from caps import caps
-def deemph(k,v,f):
- if k == 'Emph' and f == 'html':
- return walk(v,caps,f)
+"""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)