8000 Added support for quote escapes to SQL strings (#1500) · PrismJS/prism@a59a792 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit a59a792

Browse files
RunDevelopmentmAAdhaTTah
authored andcommitted
Added support for quote escapes to SQL strings (#1500)
Fixes #1454. Quotes that are escaped by using the same quote twice (e.g. 'It''s me') are now supported.
1 parent 4b56f3c commit a59a792

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

components/prism-sql.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/prism-sql.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/languages/sql/string_feature.test

+6-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ bar"
66
'fo\'obar'
77
'foo
88
bar'
9+
'foo''s bar'
10+
"foo's ""bar"""
911

1012
----------------------------------------------------
1113

@@ -15,9 +17,11 @@ bar'
1517
["string", "\"foo\r\nbar\""],
1618
["string", "''"],
1719
["string", "'fo\\'obar'"],
18-
["string", "'foo\r\nbar'"]
20+
["string", "'foo\r\nbar'"],
21+
["string", "'foo''s bar'"],
22+
["string", "\"foo's \"\"bar\"\"\""]
1923
]
2024

2125
----------------------------------------------------
2226

23-
Checks for strings.
27+
Checks for strings.

0 commit comments

Comments
 (0)
0