rubychan / coderay

Fast and easy syntax highlighting for selected languages, written in Ruby.
http://coderay.rubychan.de/
Other
846 stars 115 forks source link

Allow $ in identificators for SQL #164

Closed jasir closed 8 years ago

jasir commented 10 years ago

In #90 there is a feature for full PL/SQL support. We would like to address at least small bug. In this query

   select value/1000 from  v$sesstat se,v$statname sn where se.STATISTIC# = sn.STATISTIC# and  sn.name =  'CPU used by this session' and se.SID=ss.SID

You can se v$abc identificators. They are valid, but they are marked as error by coderay. Is there anything we can do with this?

korny commented 10 years ago

Do you know whether $ is allowed in all SQL dialects?

jasir commented 10 years ago

It is allowed in postgreSQL and mySQL, just tried to create table with such identificators.

korny commented 10 years ago

Thanks! Can you share the code here? I would add it as a test case…

benbasson commented 8 years ago

@korny if I add tests for this will you consider merging the PR? Where would I go about adding tests?

korny commented 8 years ago

I added a test case in https://github.com/rubychan/coderay-scanner-tests/blob/master/sql/dollar-signs.in.sql.