8000 SQL Quoted variables are now greedy (#1510) · PrismJS/prism@42d119a · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit 42d119a

Browse files
RunDevelopmentmAAdhaTTah
authored andcommitted
SQL Quoted variables are now greedy (#1510)
Behavior with quoted variables was incorrect for SQL. This fixes that issue by introducing a new regex for variables and making the current regex greedy. Fixes #1509.
1 parent 3e1a9a3 commit 42d119a

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

components/prism-sql.js

+9-3
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/variable_feature.test

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ ar"
66
ar'
77
@`fo\`o-b
88
ar`
9+
@'foo'
10+
@'bar'
911

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

@@ -14,7 +16,9 @@ ar`
1416
["variable", "@foo_bar_42"],
1517
["variable", "@\"fo\\\"o-b\r\nar\""],
1618
["variable", "@'fo\\'o-b\r\nar'"],
17-
["variable", "@`fo\\`o-b\r\nar`"]
19+
["variable", "@`fo\\`o-b\r\nar`"],
20+
["variable", "@'foo'"],
21+
["variable", "@'bar'"]
1822
]
1923

2024
----------------------------------------------------

0 commit comments

Comments
 (0)
0