* finish #11292: fix `addQuoted` and add changelog entry * JS is special
This commit is contained in:
parent
85ac4bfff6
commit
3e0fac7c20
2 changed files with 14 additions and 2 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue