diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2014-06-03 11:01:23 -0700 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2014-06-03 11:01:23 -0700 |
commit | 9b4e772718a868392a51727ff8cc5eba2ce35bcd (patch) | |
tree | c6fb94f57ee28f7cc00cb53e737b0833c957d98e /src/Text/Pandoc | |
parent | 2a627f85fe27d4351e9c612454d18ae701a466a3 (diff) | |
download | pandoc-9b4e772718a868392a51727ff8cc5eba2ce35bcd.tar.gz |
Templates: use ordNum instead of ord.
Closes #1022.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Templates.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Templates.hs b/src/Text/Pandoc/Templates.hs index 89856a9ee..4ae6a6d8a 100644 --- a/src/Text/Pandoc/Templates.hs +++ b/src/Text/Pandoc/Templates.hs @@ -103,7 +103,7 @@ import qualified Data.Text as T import Data.Text (Text) import Data.Text.Encoding (encodeUtf8) import Text.Pandoc.Compat.Monoid ((<>), Monoid(..)) -import Data.List (intersperse, nub) +import Data.List (intersperse) import System.FilePath ((</>), (<.>)) import qualified Data.Map as M import qualified Data.HashMap.Strict as H @@ -116,7 +116,7 @@ import Text.Blaze.Internal (preEscapedText) import Text.Blaze (preEscapedText, Html) #endif import Data.ByteString.Lazy (ByteString, fromChunks) -import Text.Pandoc.Shared (readDataFileUTF8) +import Text.Pandoc.Shared (readDataFileUTF8, ordNub) import Data.Vector ((!?)) -- | Get default template for the specified writer. @@ -163,7 +163,7 @@ varListToJSON assoc = toJSON $ M.fromList assoc' where assoc' = [(T.pack k, toVal [T.pack z | (y,z) <- assoc, not (null z), y == k]) - | k <- nub $ map fst assoc ] + | k <- ordNub $ map fst assoc ] toVal [x] = toJSON x toVal [] = Null toVal xs = toJSON xs |