2009-01-24 20:58:06 +01:00
|
|
|
module CapitalizeEmphasisPlugin (transform) where
|
|
|
|
import Text.Pandoc
|
|
|
|
import Data.Char (toUpper)
|
|
|
|
|
|
|
|
-- This plugin changes emphasized text into CAPITALIZED TEXT.
|
|
|
|
|
|
|
|
transform :: [Inline] -> [Inline]
|
2009-01-24 20:58:26 +01:00
|
|
|
transform (Emph x : ys) = processWith capStr x ++ transform ys
|
2009-01-24 20:58:06 +01:00
|
|
|
transform (x : ys) = x : transform ys
|
|
|
|
transform [] = []
|
|
|
|
|
|
|
|
capStr :: Inline -> Inline
|
|
|
|
capStr (Str x) = Str (map toUpper x)
|
|
|
|
capStr x = x
|