finish #11292: fix addQuoted and add changelog entry (#11301)

* finish #11292: fix `addQuoted` and add changelog entry

* JS is special
This commit is contained in:
Miran
2019-05-22 18:57:52 +02:00
committed by Andreas Rumpf
parent 85ac4bfff6
commit 3e0fac7c20
2 changed files with 14 additions and 2 deletions

View File

@@ -4202,6 +4202,10 @@ proc addQuoted*[T](s: var string, x: T) =
s.addEscapedChar(x)
s.add("'")
# prevent temporary string allocation
elif T is int and not defined(JS):
s.addInt(x)
elif T is float and not defined(JS):
s.addFloat(x)
elif compiles(s.add(x)):
s.add(x)
else: