Fix JSON number regression

cjson produces inexact reals (instead of integers) from JSON integers.
Ensure JSON numbers are converted to Scheme integers.
This commit is contained in:
Lassi Kortela 2021-09-04 14:17:42 +03:00
parent 109f74070c
commit 9e3636777e
1 changed files with 2 additions and 1 deletions

View File

@ -52,7 +52,8 @@
((equal? type "Header")
(let* ((level (car (contents-list)))
(h-tag (string->symbol
(string-append "h" (number->string level)))))
(string-append
"h" (number->string (inexact->exact level))))))
`(,h-tag ,@(convert-many (vector->list
(list-ref (contents-list) 2))))))
((equal? type "Link")