yesod-rst 0.1 → 0.2
raw patch · 2 files changed
+16/−15 lines, 2 filesdep ~hamletdep ~persistentdep ~yesod-corePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: hamlet, persistent, yesod-core, yesod-form
API changes (from Hackage documentation)
Files
- Yesod/RST.hs +4/−4
- yesod-rst.cabal +12/−11
Yesod/RST.hs view
@@ -24,7 +24,7 @@ import Yesod.Form (ToField(..), areq, aopt) import Yesod.Core (RenderMessage, SomeMessage(..)) import Yesod.Form.Types-import Yesod.Widget (addHamlet)+import Yesod.Widget (toWidget) import Text.Hamlet (hamlet, Html) import Database.Persist (PersistField) @@ -36,7 +36,7 @@ import Data.String (IsString) import System.Directory (doesFileExist) -import Data.Text (Text, pack, unpack, intercalate)+import Data.Text (Text, pack, unpack) newtype RST = RST String@@ -51,9 +51,9 @@ rstField :: RenderMessage master FormMessage => Field sub master RST rstField = Field { fieldParse = blank $ Right . RST . unlines . lines' . unpack- , fieldView = \theId name theClass val _isReq -> addHamlet+ , fieldView = \theId name attrs val _isReq -> toWidget [hamlet|-<textarea id="#{theId}" name="#{name}" :not (null theClass):class="#{intercalate " " theClass}">#{either id unRST val}+<textarea id="#{theId}" name="#{name}" *{attrs}>#{either id unRST val} |] } where
yesod-rst.cabal view
@@ -1,5 +1,5 @@ name: yesod-rst-version: 0.1+version: 0.2 synopsis: Tools for using reStructuredText (RST) in a yesod application description: A subset of pandoc functionality useful for RST processing in yesod applications homepage: http://github.com/pSub/yesod-rst@@ -14,16 +14,16 @@ library exposed-modules: Yesod.RST - build-depends: base >= 4 && < 5- , text >= 0.11 && < 0.12- , pandoc >= 1.9 && < 1.10- , blaze-html >= 0.4 && < 0.5- , xss-sanitize >= 0.3.1 && < 0.4+ build-depends: base >= 4 && < 5+ , text >= 0.11 && < 0.12+ , pandoc >= 1.9 && < 1.10+ , blaze-html >= 0.4 && < 0.5+ , xss-sanitize >= 0.3.1 && < 0.4 , directory- , yesod-core >= 0.10 && < 0.11- , yesod-form >= 0.4 && < 0.5- , hamlet- , persistent+ , yesod-core >= 1.0 && < 1.1+ , yesod-form >= 1.0 && < 1.1+ , hamlet >= 1.0 && < 1.1+ , persistent >= 0.9 && < 0.10 ghc-options: -Wall @@ -35,6 +35,7 @@ MultiParamTypeClasses GeneralizedNewtypeDeriving -source-repository head+source-repository this type: git location: git://github.com/pSub/yesod-rst.git+ tag: 0.2