Skip to content

Commit

Permalink
Proper handling of String +123 serialization (fixes #64)
Browse files Browse the repository at this point in the history
  • Loading branch information
snoyberg committed Jul 20, 2015
1 parent 963ba05 commit 438f0bc
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.8.12

* Proper handling of `String "+123"` [#64](https://github.com/snoyberg/yaml/issues/64)

## 0.8.11

* Function to print prettier parse exceptions [#59](https://github.com/snoyberg/yaml/pull/59)
Expand Down
1 change: 1 addition & 0 deletions Data/Yaml.hs
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ isNumeric =
|| c == 'E'
|| c == '.'
|| c == '-'
|| c == '+'

decode :: FromJSON a
=> ByteString
Expand Down
3 changes: 3 additions & 0 deletions test/Data/YamlSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ spec = do

it "aliases in keys #49" caseIssue49

it "serialization of +123 #64" $ do
D.decode (D.encode ("+123" :: String)) `shouldBe` Just ("+123" :: String)


specialStrings :: [T.Text]
specialStrings =
Expand Down
2 changes: 1 addition & 1 deletion yaml.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: yaml
version: 0.8.11
version: 0.8.12
license: BSD3
license-file: LICENSE
author: Michael Snoyman <michael@snoyman.com>, Anton Ageev <antage@gmail.com>,Kirill Simonov
Expand Down

0 comments on commit 438f0bc

Please sign in to comment.