Fix toJSStr for control characters

fixes #4190
Add leading zero to encoded character if it is less than 0x10
This commit is contained in:
nigredo-tori 2016-05-20 12:17:57 +06:00 • committed by Dmitry Polienko
commit 85c41a1398
2 changed files with 11 additions and 1 deletions

6
tests/js/testtojsstr.nim Normal file
View file

@ -0,0 +1,6 @@
discard """
output = ""
"""
let s: string = "И\n"
let cs = s.cstring