Skip to content
Browse files

Fix issue regarding docTypeHtml in lowercase

Closes #66
  • Loading branch information...
1 parent c65d721 commit 2bf687291743fce5f2036632ce915bf00fc6d65c @jaspervdj committed Jun 16, 2012
Showing with 6 additions and 2 deletions.
  1. +1 −1 blaze-from-html.cabal.blaze-from-html
  2. +5 −1 src/Util/Sanitize.hs
View
2 blaze-from-html.cabal.blaze-from-html
@@ -1,5 +1,5 @@
Name: blaze-from-html
-Version: 0.3.2.0
+Version: 0.3.2.1
Synopsis: Tool to convert HTML to BlazeHtml code.
Description: Tool that converts HTML files to Haskell code, ready to be
used with the BlazeHtml library.
View
6 src/Util/Sanitize.hs
@@ -19,8 +19,12 @@ import qualified Data.Set as S
-- > sanitize "http-equiv" == "httpEquiv"
--
sanitize :: String -> String
-sanitize = appendUnderscore . removeDash . map toLower
+sanitize str
+ | lower == "doctypehtml" = "docTypeHtml"
+ | otherwise = appendUnderscore $ removeDash lower
where
+ lower = map toLower str
+
-- Remove a dash, replacing it by camelcase notation
--
-- Example:

0 comments on commit 2bf6872

Please sign in to comment.
Something went wrong with that request. Please try again.