packages feed

dot 0.2.0 → 0.2.1

raw patch · 2 files changed

+7/−2 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

dot.cabal view
@@ -1,5 +1,5 @@ name:                dot-version:             0.2.0+version:             0.2.1 synopsis:            Data types and encoding for graphviz dot files description:         Please see README.md homepage:            https://github.com/andrewthad/dot#readme
src/Dot/Text.hs view
@@ -10,6 +10,7 @@ import Data.Text.Lazy.Builder (Builder) import qualified Data.Text.Lazy.Builder as Builder import qualified Data.Text.Lazy as LText+import qualified Data.Text as Text import Data.Monoid import Dot.Types @@ -35,7 +36,11 @@   <> "}"  encodeId :: Id -> Builder-encodeId (Id theId) = Builder.fromText theId+encodeId (Id theId) = case Text.uncons theId of+  Just (c,_) -> if not (c >= '0' && c <= '9') && Text.all (\c -> (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c == '_') theId+    then Builder.fromText theId+    else "\"" <> Builder.fromText (Text.replace "\"" "\\\"" theId) <> "\""+  Nothing -> "\"\""  encodeNodeId :: NodeId -> Builder encodeNodeId (NodeId theId mport) =