720e9ce3a5
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1521 788f1e2b-df1e-0410-8736-df70ead52e1b
14 lines
413 B
Haskell
14 lines
413 B
Haskell
module CapitalizeEmphasisPlugin (transform) where
|
|
import Text.Pandoc
|
|
import Data.Char (toUpper)
|
|
|
|
-- This plugin changes emphasized text into CAPITALIZED TEXT.
|
|
|
|
transform :: [Inline] -> [Inline]
|
|
transform (Emph x : ys) = processWith capStr x ++ transform ys
|
|
transform (x : ys) = x : transform ys
|
|
transform [] = []
|
|
|
|
capStr :: Inline -> Inline
|
|
capStr (Str x) = Str (map toUpper x)
|
|
capStr x = x
|