diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2009-01-24 19:58:26 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2009-01-24 19:58:26 +0000 |
commit | 720e9ce3a5c822dc800adc862c20f098ab602902 (patch) | |
tree | b82ed90f9a54eb3ecddc127e1522e6d27a88eee7 /README | |
parent | 066e1cfe90090f1f45dd00194805cdae7c8774e9 (diff) | |
download | pandoc-720e9ce3a5c822dc800adc862c20f098ab602902.tar.gz |
Renamed processIn -> processWith, queryIn -> queryWith.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1521 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'README')
-rw-r--r-- | README | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1242,7 +1242,7 @@ import Text.Pandoc import Data.Char (toUpper) transform :: [Inline] -> [Inline] -transform (Emph xs : ys) = processIn capStr xs ++ transform ys +transform (Emph xs : ys) = processWith capStr xs ++ transform ys transform (x : ys) = x : transform ys transform [] = [] @@ -1255,19 +1255,19 @@ Here `transform` converts a whole list of `Inline` elements to another such list. The key clause is ~~~ {.haskell} -transform (Emph xs : ys) = processIn capStr xs ++ transform ys +transform (Emph xs : ys) = processWith capStr xs ++ transform ys ~~~ This applies the `capStr` function recursively to all inlines in the list of emphasized inlines and puts the transformed list in place of the original. `capStr` is a simple `Inline` transformation that capitalizes `Str` elements and leaves everything else alone. The -function `processIn`, defined in `Text.Pandoc.Definition`, uses some +function `processWith`, defined in `Text.Pandoc.Definition`, uses some `Data.Generics` magic to apply its argument (here `capStr`) to every `Inline` element in a list, including elements that are deeply buried in other elements. Thus - processIn captStr [Str "one", Strong [Str "two", Space]] ==> + processWith captStr [Str "one", Strong [Str "two", Space]] ==> [Str "ONE", Strong [Str "TWO", Space]] There are other sample plugins in the `plugins` subdirectory of the |