Avoid overescaping * #113
commitaa7d64bb1b2cddd7a7e3789598c4299a3537c3c2
authorMichael Snoyman <michael@snoyman.com>
dateFri 14 Jul 2017, 10:18 (9 years ago)
parent11224b8
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+
15## 0.8.23.2
26
37* Update libyaml [#110](https://github.com/snoyberg/yaml/issues/110)
Data/Yaml/Internal.hs+1−1
@@ -281,7 +281,7 @@ decodeHelper_ src = do
281281-- | Strings which must be escaped so as not to be treated as non-string scalars.
282282specialStrings :: HashSet.HashSet Text
283283specialStrings = 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 ~ *"
285285
286286isNumeric :: Text -> Bool
287287isNumeric t =
test/Data/YamlSpec.hs+1
@@ -116,6 +116,7 @@ spec = do
116116 it "True" $ D.encode (object ["foo" .= True]) `shouldBe` "foo: true\n"
117117 it "False" $ D.encode (object ["foo" .= False]) `shouldBe` "foo: false\n"
118118 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"
119120
120121 describe "special keys" $ do
121122 let tester key = it (T.unpack key) $
yaml.cabal+1−1
@@ -1,5 +1,5 @@
11name: yaml
2−version: 0.8.23.2
2+version: 0.8.23.3
33license: BSD3
44license-file: LICENSE
55author: Michael Snoyman <michael@snoyman.com>, Anton Ageev <antage@gmail.com>,Kirill Simonov