Hello community,

here is the log from the commit of package ghc-shakespeare for openSUSE:Factory 
checked in at 2017-03-18 20:50:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-shakespeare (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-shakespeare.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-shakespeare"

Sat Mar 18 20:50:00 2017 rev:10 rq:450620 version:2.0.12.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-shakespeare/ghc-shakespeare.changes  
2016-12-06 14:25:47.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-shakespeare.new/ghc-shakespeare.changes     
2017-03-18 20:50:01.498345821 +0100
@@ -1,0 +2,5 @@
+Mon Jan  9 06:36:31 UTC 2017 - psim...@suse.com
+
+- Update to version 2.0.12.1 with cabal2obs.
+
+-------------------------------------------------------------------

Old:
----
  shakespeare-2.0.11.2.tar.gz

New:
----
  shakespeare-2.0.12.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-shakespeare.spec ++++++
--- /var/tmp/diff_new_pack.ExkN5Z/_old  2017-03-18 20:50:02.238241003 +0100
+++ /var/tmp/diff_new_pack.ExkN5Z/_new  2017-03-18 20:50:02.242240436 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-shakespeare
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
 %global pkg_name shakespeare
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        2.0.11.2
+Version:        2.0.12.1
 Release:        0
 Summary:        A toolkit for making compile-time interpolated templates
 License:        MIT

++++++ shakespeare-2.0.11.2.tar.gz -> shakespeare-2.0.12.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shakespeare-2.0.11.2/ChangeLog.md 
new/shakespeare-2.0.12.1/ChangeLog.md
--- old/shakespeare-2.0.11.2/ChangeLog.md       2016-11-17 21:00:16.000000000 
+0100
+++ new/shakespeare-2.0.12.1/ChangeLog.md       2016-12-28 10:13:50.000000000 
+0100
@@ -1,3 +1,11 @@
+### 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)
+
 ### 2.0.11.2
 
 * Support for template-haskell 2.12.0 
[#196](https://github.com/yesodweb/shakespeare/pull/196)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shakespeare-2.0.11.2/Text/Hamlet/Parse.hs 
new/shakespeare-2.0.12.1/Text/Hamlet/Parse.hs
--- old/shakespeare-2.0.11.2/Text/Hamlet/Parse.hs       2016-11-17 
21:00:16.000000000 +0100
+++ new/shakespeare-2.0.12.1/Text/Hamlet/Parse.hs       2016-12-28 
10:13:50.000000000 +0100
@@ -246,12 +246,18 @@
         cc [] = []
         cc (ContentRaw a:ContentRaw b:c) = cc $ ContentRaw (a ++ b) : c
         cc (a:b) = a : cc b
-    content' cr = contentHash <|> contentAt <|> contentCaret
-                              <|> contentUnder
-                              <|> contentReg' cr
-    contentHash = do
+
+    content' cr =     contentHash cr
+                  <|> contentAt
+                  <|> contentCaret
+                  <|> contentUnder
+                  <|> contentReg' cr
+    contentHash cr = do
         x <- parseHash
         case x of
+            Left "#" -> case cr of
+                          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
@@ -281,13 +287,7 @@
     tagCond = do
         d <- between (char ':') (char ':') parseDeref
         tagClass (Just d) <|> tagAttrib (Just d)
-    tagClass x = do
-        clazz <- char '.' >> tagAttribValue NotInQuotes
-        let hasHash (ContentRaw s) = any (== '#') s
-            hasHash _ = False
-        if any hasHash clazz
-            then fail $ "Invalid class: " ++ show clazz ++ ". Did you want a 
space between a class and an ID?"
-            else return (TagClass (x, clazz))
+    tagClass x = char '.' >> (TagClass . ((,)x)) <$> tagAttribValue NotInQuotes
     tagAttrib cond = do
         s <- many1 $ noneOf " \t=\r\n><"
         v <- (char '=' >> Just <$> tagAttribValue NotInQuotesAttr) <|> return 
Nothing
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shakespeare-2.0.11.2/shakespeare.cabal 
new/shakespeare-2.0.12.1/shakespeare.cabal
--- old/shakespeare-2.0.11.2/shakespeare.cabal  2016-11-17 21:00:16.000000000 
+0100
+++ new/shakespeare-2.0.12.1/shakespeare.cabal  2016-12-28 10:13:50.000000000 
+0100
@@ -1,5 +1,5 @@
 name:            shakespeare
-version:         2.0.11.2
+version:         2.0.12.1
 license:         MIT
 license-file:    LICENSE
 author:          Michael Snoyman <mich...@snoyman.com>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shakespeare-2.0.11.2/test/Text/HamletSpec.hs 
new/shakespeare-2.0.12.1/test/Text/HamletSpec.hs
--- old/shakespeare-2.0.11.2/test/Text/HamletSpec.hs    2016-11-17 
21:00:16.000000000 +0100
+++ new/shakespeare-2.0.12.1/test/Text/HamletSpec.hs    2016-12-28 
10:13:50.000000000 +0100
@@ -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


Reply via email to