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 language detection breaks if you use a < or > character in an if statement #1432

Closed
jasongisstl opened this issue Jan 23, 2017 · 4 comments

Comments

@jasongisstl
Copy link

If you have a less than or greater than character in an if statement, SQL language detection will fail.

E.g:
hljs.highlightAuto("if 5 < 10", ["sql"]);

Returns text with no language highlighting, as "<" is detected as an 'illegal lexeme'.

@jasongisstl jasongisstl changed the title Unable to use < or > in SQL if statement SQL language detection breaks if you use a < or > character in an if statement Jan 23, 2017
@DavidSimner
Copy link

For Microsoft SQL Server's Transact-SQL (T-SQL), this issue is fixed in #1524

@egor-rogov
Copy link
Collaborator

Now works for PostgreSQL (#1804).
As for pure standard SQL, if is not a valid statement anyway.

@joshgoebel
Copy link
Member

Sounds like we could close this one then? @egor-rogov

@egor-rogov
Copy link
Collaborator

I guess so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants