mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-07 13:33:22 +00:00
Expand dbQuote to handle backslashes
This commit is contained in:
@@ -120,6 +120,7 @@ proc dbQuote*(s: string): string =
|
||||
result = "'"
|
||||
for c in items(s):
|
||||
if c == '\'': add(result, "''")
|
||||
if c == '\\': add(result, "\\\\")
|
||||
else: add(result, c)
|
||||
add(result, '\'')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user