874c3e0dea
+ In Text.Pandoc.Definition, added processIn, processInM, and queryIn, and deprecated processPandoc and queryPandoc for these more general functions, which are useful in writing plugins. + Added module Text.Pandoc.Plugins. + Added a --plugins option to Main, and code to run the parsed pandoc document through all the plugins. + Provided five sample plugin files in the plugins/ directory. + Documented --plugin in the pandoc man page and README. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1519 788f1e2b-df1e-0410-8736-df70ead52e1b
10 lines
299 B
Haskell
10 lines
299 B
Haskell
module WordPressPlugin (transform) where
|
|
import Text.Pandoc
|
|
|
|
-- This plugin (when used with -m) prints LaTeX math in the
|
|
-- format required by WordPress blogs. $e=mc^2$ becomes
|
|
-- $LaTeX e=mc^2$.
|
|
|
|
transform :: Inline -> Inline
|
|
transform (Math x y) = Math x $ "LaTeX " ++ y
|
|
transform x = x
|