Skip to content

Commit

Permalink
AQL: Disallow unclosed multiline comments again (#2089)
Browse files Browse the repository at this point in the history
This reverts commit f3c6ba5.
  • Loading branch information
Simran-B authored and RunDevelopment committed Oct 15, 2019
1 parent c8b48b9 commit 717ace0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion components/prism-aql.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Prism.languages.aql = {
'comment': /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,
'comment': /\/\/.*|\/\*[\s\S]*?\*\//,
'property': {
pattern: /([{,]\s*)(?:(?!\d)\w+|(["'´`])(?:(?!\2)[^\\\r\n]|\\.)*\2)(?=\s*:)/,
lookbehind: true,
Expand Down
2 changes: 1 addition & 1 deletion components/prism-aql.min.js

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

5 changes: 1 addition & 4 deletions tests/languages/aql/comment_feature.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@
multi
line
*/
/* unclosed multi-line comments are allowed
RETURN 1

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

[
["comment", "// single line"],
["comment", "/*\r\n multi\r\n line\r\n */"],
["comment", "/* unclosed multi-line comments are allowed\r\nRETURN 1"]
["comment", "/*\r\n multi\r\n line\r\n */"]
]

----------------------------------------------------
Expand Down

0 comments on commit 717ace0

Please sign in to comment.