Skip to content

Commit

Permalink
Added support for quote escapes to SQL strings (#1500)
Browse files Browse the repository at this point in the history
Fixes #1454.

Quotes that are escaped by using the same quote twice (e.g. 'It''s me') are now supported.
  • Loading branch information
RunDevelopment authored and mAAdhaTTah committed Aug 19, 2018
1 parent 4b56f3c commit a59a792
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions components/prism-sql.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion components/prism-sql.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions tests/languages/sql/string_feature.test
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ bar"
'fo\'obar'
'foo
bar'
'foo''s bar'
"foo's ""bar"""

----------------------------------------------------

Expand All @@ -15,9 +17,11 @@ bar'
["string", "\"foo\r\nbar\""],
["string", "''"],
["string", "'fo\\'obar'"],
["string", "'foo\r\nbar'"]
["string", "'foo\r\nbar'"],
["string", "'foo''s bar'"],
["string", "\"foo's \"\"bar\"\"\""]
]

----------------------------------------------------

Checks for strings.
Checks for strings.

0 comments on commit a59a792

Please sign in to comment.