mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-31 02:12:11 +00:00
* finish #11292: fix `addQuoted` and add changelog entry * JS is special
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user