summaryrefslogtreecommitdiff
path: root/src/Hakyll
diff options
context:
space:
mode:
authorJasper Van der Jeugt <m@jaspervdj.be>2012-11-27 16:10:45 +0100
committerJasper Van der Jeugt <m@jaspervdj.be>2012-11-27 16:10:45 +0100
commitdb45ea9d8cb8fd199de2239b6bc28aff3ad53cce (patch)
tree61a4345cb0cb9d7130d5f041753bc68f80a45674 /src/Hakyll
parent1bcce776e786eb6688bace653ecafa1a5a4fb563 (diff)
downloadhakyll-db45ea9d8cb8fd199de2239b6bc28aff3ad53cce.tar.gz
Allow arbitrary keys, update some tests
Diffstat (limited to 'src/Hakyll')
-rw-r--r--src/Hakyll/Web/Template/Read.hs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Hakyll/Web/Template/Read.hs b/src/Hakyll/Web/Template/Read.hs
index f8583ff..7dfe003 100644
--- a/src/Hakyll/Web/Template/Read.hs
+++ b/src/Hakyll/Web/Template/Read.hs
@@ -6,12 +6,11 @@ module Hakyll.Web.Template.Read
--------------------------------------------------------------------------------
-import Data.List (isPrefixOf)
-import Data.Char (isAlphaNum)
+import Data.List (isPrefixOf)
--------------------------------------------------------------------------------
-import Hakyll.Web.Template.Internal
+import Hakyll.Web.Template.Internal
--------------------------------------------------------------------------------
@@ -39,4 +38,4 @@ readTemplate = Template . readTemplate'
then Just (key, drop 1 rest)
else Nothing
- validKeyChar x = isAlphaNum x || x == ' '
+ validKeyChar x = x `notElem` ['$', '\n', '\r']