on master help sign in
Avoid overescaping * #113
aa7d64bMichael Snoyman
ChangeLog.md+4
@@ -1,3 +1,7 @@
1+## 0.8.23.3
2+
3+* Avoid over-escaping `*` [#113](https://github.com/snoyberg/yaml/issues/113)
4+
1## 0.8.23.2
5## 0.8.23.2
2
6
3* Update libyaml [#110](https://github.com/snoyberg/yaml/issues/110)
7* Update libyaml [#110](https://github.com/snoyberg/yaml/issues/110)
Data/Yaml/Internal.hs+1−1
@@ -281,7 +281,7 @@ decodeHelper_ src = do
281-- | Strings which must be escaped so as not to be treated as non-string scalars.
281-- | Strings which must be escaped so as not to be treated as non-string scalars.
282specialStrings :: HashSet.HashSet Text
282specialStrings :: HashSet.HashSet Text
283specialStrings = HashSet.fromList $ T.words
283specialStrings = HashSet.fromList $ T.words
284− "y Y yes Yes YES n N no No NO true True TRUE false False FALSE on On ON off Off OFF null Null NULL ~"
284+ "y Y yes Yes YES n N no No NO true True TRUE false False FALSE on On ON off Off OFF null Null NULL ~ *"
285
285
286isNumeric :: Text -> Bool
286isNumeric :: Text -> Bool
287isNumeric t =
287isNumeric t =
test/Data/YamlSpec.hs+1
@@ -116,6 +116,7 @@ spec = do
116 it "True" $ D.encode (object ["foo" .= True]) `shouldBe` "foo: true\n"
116 it "True" $ D.encode (object ["foo" .= True]) `shouldBe` "foo: true\n"
117 it "False" $ D.encode (object ["foo" .= False]) `shouldBe` "foo: false\n"
117 it "False" $ D.encode (object ["foo" .= False]) `shouldBe` "foo: false\n"
118 it "simple string" $ D.encode (object ["foo" .= ("bar" :: T.Text)]) `shouldBe` "foo: bar\n"
118 it "simple string" $ D.encode (object ["foo" .= ("bar" :: T.Text)]) `shouldBe` "foo: bar\n"
119+ it "*" $ D.encode (object ["foo" .= ("*" :: T.Text)]) `shouldBe` "foo: '*'\n"
119
120
120 describe "special keys" $ do
121 describe "special keys" $ do
121 let tester key = it (T.unpack key) $
122 let tester key = it (T.unpack key) $
yaml.cabal+1−1
@@ -1,5 +1,5 @@
1name: yaml
1name: yaml
2−version: 0.8.23.2
2+version: 0.8.23.3
3license: BSD3
3license: BSD3
4license-file: LICENSE
4license-file: LICENSE
5author: Michael Snoyman <michael@snoyman.com>, Anton Ageev <antage@gmail.com>,Kirill Simonov
5author: Michael Snoyman <michael@snoyman.com>, Anton Ageev <antage@gmail.com>,Kirill Simonov