strip the newlines off yaml encodings in the ValueSchema docs

This commit is contained in:
Tom Sydney Kerckhove 2021-10-30 20:38:08 +02:00
parent d7254410d2
commit 6ee83a4426
4 changed files with 1 additions and 12 deletions

View File

@ -25,11 +25,7 @@
fruit: # required
# fruit!!
[ Apple
, Orange
, Banana
, Melon
]

View File

@ -1,9 +1,5 @@
[ Apple
, Orange
, Banana
, Melon
]

View File

@ -1,7 +1,4 @@
[ LT
, EQ
, GT
]

View File

@ -65,7 +65,7 @@ jsonSchemaChunks = concatMap (\l -> l ++ ["\n"]) . (`evalState` S.empty) . go
in if null s
then pure [["<object>"]]
else concat <$> mapM (uncurry keySchemaFor) s
ValueSchema v -> pure [[chunk $ TE.decodeUtf8With TE.lenientDecode (Yaml.encode v)]]
ValueSchema v -> pure [[chunk $ T.strip $ TE.decodeUtf8With TE.lenientDecode (Yaml.encode v)]]
ChoiceSchema s ->
let addListAround = \case
s_ :| [] -> do