Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL comment yields wrong highlighting #1454

Closed
fabsenet opened this issue Jun 28, 2018 · 2 comments · Fixed by #1500
Closed

SQL comment yields wrong highlighting #1454

fabsenet opened this issue Jun 28, 2018 · 2 comments · Fixed by #1500

Comments

@fabsenet
Copy link

I have the following sql. Yes, I have sql queries in database tables. Do not judge me 🐇

This is the code i want to highlight:

INSERT INTO MESSAGESEARCHPATTERN (name, query)
VALUES ('a','select ''hello world'' from a')

-- this is a comment

INSERT INTO MESSAGESEARCHPATTERN (name, query)
VALUES ('a','select ''hello world'' from a')

this is, what the test page/prismjs makes from it (language is SQL):
grafik

@yakov116
Copy link

yakov116 commented Jul 4, 2018

@fabsenet me too 😀

I however use it more for documentation.

@Golmote
Copy link
Contributor

Golmote commented Jul 6, 2018

From a really quick look at it, it appears to be more about the '' part of the string than about the comment. I think our component does not handle "quote-escaped quotes" (is there a name for this?) in the string pattern at the moment.

mAAdhaTTah pushed a commit that referenced this issue Aug 19, 2018
Fixes #1454.

Quotes that are escaped by using the same quote twice (e.g. 'It''s me') are now supported.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants