git.iko.soy/typeable/pandoc
on dcedb2f help sign in
typeable/pandoc/plugins/CapitalizeEmphasisPlugin.hs
14 lines 413 B history raw
1module CapitalizeEmphasisPlugin (transform) where
2import Text.Pandoc
3import Data.Char (toUpper)
5-- This plugin changes emphasized text into CAPITALIZED TEXT.
7transform :: [Inline] -> [Inline]
8transform (Emph x : ys) = processWith capStr x ++ transform ys
9transform (x : ys) = x : transform ys
10transform [] = []
12capStr :: Inline -> Inline
13capStr (Str x) = Str (map toUpper x)
14capStr x = x