diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2013-08-10 18:45:00 -0700 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2013-08-10 18:45:00 -0700 |
commit | 02a125d0aa8becd258c99b27c5e30116f0cbacb4 (patch) | |
tree | 71d9b34587e9e6ee90c4b6df04f1bddf4e114b6b /src/Text/Pandoc/Shared.hs | |
parent | 9152fa1a95346e26bc290b3f5018b2eeb5d4e077 (diff) |
Use walk, walkM in place of bottomUp, bottomUpM when possible.
They are significantly faster.
Diffstat (limited to 'src/Text/Pandoc/Shared.hs')
-rw-r--r-- | src/Text/Pandoc/Shared.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Shared.hs b/src/Text/Pandoc/Shared.hs index 2b692dc3c..6fd78b188 100644 --- a/src/Text/Pandoc/Shared.hs +++ b/src/Text/Pandoc/Shared.hs @@ -518,7 +518,7 @@ isHeaderBlock _ = False -- | Shift header levels up or down. headerShift :: Int -> Pandoc -> Pandoc -headerShift n = bottomUp shift +headerShift n = walk shift where shift :: Block -> Block shift (Header level attr inner) = Header (level + n) attr inner shift x = x |