mirror of
https://github.com/roc-lang/roc.git
synced 2025-07-24 15:03:46 +00:00
roc format
This commit is contained in:
parent
3fbfdc3e4a
commit
53d5d95c52
1 changed files with 5 additions and 5 deletions
|
@ -512,11 +512,11 @@ decodeRecord = \initialState, stepField, finalizer -> Decode.custom \bytes, @Jso
|
|||
#
|
||||
# Note that this does not handle leading whitespace, any whitespace must be
|
||||
# handled in json list or record decoding.
|
||||
#
|
||||
# |> List.dropIf \b -> b == '+'
|
||||
#
|
||||
# |> List.dropIf \b -> b == '+'
|
||||
# TODO ^^ not needed if roc supports "1e+2", this supports
|
||||
# "+" which is permitted in Json numbers
|
||||
#
|
||||
#
|
||||
# |> List.map \b -> if b == 'E' then 'e' else b
|
||||
# TODO ^^ not needed if roc supports "1E2", this supports
|
||||
# "E" which is permitted in Json numbers
|
||||
|
@ -529,7 +529,7 @@ takeJsonNumber = \bytes ->
|
|||
|> List.sublist { start: 0, len: n }
|
||||
|> List.dropIf \b -> b == '+'
|
||||
|> List.map \b -> if b == 'E' then 'e' else b
|
||||
|
||||
|
||||
{ taken, rest: List.drop bytes n }
|
||||
|
||||
_ ->
|
||||
|
@ -1083,7 +1083,7 @@ expect
|
|||
|
||||
actual.result == expected
|
||||
|
||||
# Test decode of json strings ignoring whitespace
|
||||
# Test decode of json strings ignoring whitespace
|
||||
expect
|
||||
input = Str.toUtf8 "\n\t [\n \"one\"\r , \"two\" , \n\"3\"\t]"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue