packages feed

shakespeare 2.0.12 → 2.0.12.1

raw patch · 4 files changed

+15/−3 lines, 4 files

Files

ChangeLog.md view
@@ -1,3 +1,7 @@+### 2.0.12.1++* New contentHash parser breaks hash hrefs [#200](https://github.com/yesodweb/shakespeare/issues/200)+ ### 2.0.12  * Parser fails without space between class and ID (Hamlet) [#197](https://github.com/yesodweb/shakespeare/issues/197)
Text/Hamlet/Parse.hs view
@@ -256,8 +256,8 @@         x <- parseHash         case x of             Left "#" -> case cr of-                          InContent -> return (ContentRaw "#", False)-                          _ -> fail "Expected hash at end of line, got Id"+                          NotInQuotes -> fail "Expected hash at end of line, got Id"+                          _ -> return (ContentRaw "#", False)             Left str -> return (ContentRaw str, null str)             Right deref -> return (ContentVar deref, False)     contentAt = do
shakespeare.cabal view
@@ -1,5 +1,5 @@ name:            shakespeare-version:         2.0.12+version:         2.0.12.1 license:         MIT license-file:    LICENSE author:          Michael Snoyman <michael@snoyman.com>
test/Text/HamletSpec.hs view
@@ -501,6 +501,14 @@             ] renderer
         helperHtml "foo(5,[(\"hello\",\"world\")])bar" res
 
+    it "Hash in attribute value" $
+        helper "<a id=\"logoutbutton\" href=\"#\"></a>\n"
+        [hamlet|<a #logoutbutton href=#>|]
+
+    it "Hash in attribute value" $
+        helper "<a id=\"logoutbutton\" href=\"#\"></a>\n"
+        [hamlet|<a #logoutbutton href="#">|]
+
 data Pair = Pair String Int
 
 data Url = Home | Sub SubUrl