summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfresheyeball <>2020-05-22 19:05:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2020-05-22 19:05:00 (GMT)
commit2fb2a0c75c006775eb6b8b85160b070bdd743e5b (patch)
tree6f95ed91d68e8e64d9ef17db46bebb9cb4550c9d
parent8d649ec6b75fe55ebf6a80d4a0e69f5bb26c9acb (diff)
version 0.1.0.1HEAD0.1.0.1master
-rw-r--r--LICENSE2
-rw-r--r--Shpadoinkle-backend-static.cabal6
-rw-r--r--Shpadoinkle/Backend/Static.hs7
3 files changed, 10 insertions, 5 deletions
diff --git a/LICENSE b/LICENSE
index 02cf907..b555f5b 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,5 +1,5 @@
Shpadoinkle Static, I think I know exactly what it means
-Copyright © 2019 Isaac Shpaira
+Copyright © 2020 Isaac Shpaira
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/Shpadoinkle-backend-static.cabal b/Shpadoinkle-backend-static.cabal
index 8658ae1..1c44416 100644
--- a/Shpadoinkle-backend-static.cabal
+++ b/Shpadoinkle-backend-static.cabal
@@ -4,10 +4,10 @@ cabal-version: 1.12
--
-- see: https://github.com/sol/hpack
--
--- hash: 93513838cda5ea2fae8871bd7419fc548395fc98be7b87c6483bc799b60058cc
+-- hash: 10c22468330265f5a289c3bd653839967387f602db4e70b02ae2d37205b03688
name: Shpadoinkle-backend-static
-version: 0.1.0.0
+version: 0.1.0.1
synopsis: A backend for rendering Shpadoinkle as Text.
description: Shpadoinkle's static backend, renders Html as Text. Event listeners are ignored. This is useful when rendering on the server, or for static site generation.
category: Web
@@ -30,7 +30,7 @@ library
ghc-options: -Wall -Wcompat -fwarn-redundant-constraints -fwarn-incomplete-uni-patterns -fwarn-tabs -fwarn-incomplete-record-updates -fwarn-identities
build-depends:
Shpadoinkle
- , base >=4.12.0 && <4.15
+ , base >=4.12.0 && <4.16
, compactable >=0.1.2 && <0.2
, text >=1.2.3 && <1.3
default-language: Haskell2010
diff --git a/Shpadoinkle/Backend/Static.hs b/Shpadoinkle/Backend/Static.hs
index 0da6a98..c82f448 100644
--- a/Shpadoinkle/Backend/Static.hs
+++ b/Shpadoinkle/Backend/Static.hs
@@ -52,7 +52,12 @@ renderProps = Data.Text.unwords . fmapMaybe (uncurry renderProp)
renderProp :: Text -> Prop m a -> Maybe Text
renderProp name = \case
PListener _ -> Nothing
- PText t -> Just $ name <> "=\"" <> t <> "\""
+ PText t -> Just $ lice name <> "=\"" <> t <> "\""
PFlag True -> Just name
PFlag False -> Nothing
+ where
+ lice = \case
+ "className" -> "class"
+ x -> x
+