Opened 18 years ago
Closed 18 years ago
#3800 closed defect (worksforme)
SQL syntax coloring does not work
Reported by: | Owned by: | Jonas Borgström | |
---|---|---|---|
Priority: | low | Milestone: | |
Component: | general | Version: | 0.10b1 |
Severity: | minor | Keywords: | needinfo |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
The sql syntax hiliting does not work when using SilverCity. The other languages I tested (a listed in the TracSyntaxColoring guide) did work ok. I haved both sql and text/x-sql, neither crashes, but both produce no results. My test case is :
{{{ #!sql [or] #!text/x-sql SELECT * from dbo.TableName T WHERE [field] = 'Value' AND T.other = 7 }}}
Is this a trac issue, or a SilverCity? I couldn't trace the code well, so I couldn't tell.
Windows XP SP2/Apache 2.0.54/python 2.4/mod_python/SilverCity 0.96-py2.4
Attachments (0)
Change History (4)
comment:1 by , 18 years ago
comment:2 by , 18 years ago
Keywords: | needinfo added |
---|
Turn on TracLogging and check for errors with SilverCity. If you have SilverCity 0.9.6 installed you'll need to downgrade to 0.9.5 since there were some API breakages in the newer version.
Also, note that SilverCity's SQL coloring doesn't do much. Only the 'Value' and 7 will appear colored.
comment:3 by , 18 years ago
I noticed errors when running the sql coloring component manually (from the SilverCity direcotyr) that reference the lack of WordLists(). I came here after reading the comments to a similar issue with CSS. Unfortunatly I am stuck with .96 since I use py2.4. If that is not the case, let me know.
I was able to fix that by hacking the component by hand, but it still would not color the syntax. It would just wrap everything in a c_string div. There is something that I am missing, and I am sure the lack of a SCE_SQL doesn't help.
I wouldn't mind fixing it if could figure out how. It doesn't seem that the underlying lexer really supports sql, so I'm not sure how my twiddling knobs would help all that much.
The support from enscript aint much better. It bolds keywords, colors comments and strings, and thats it. I have switched to that for now, speed or no speed.
comment:4 by , 18 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Works fine with pygments, so need for this.
I added the path to enscript to trac.ini, and now it colors. I though silvercity was favored if it was installed, but it's going right to enscript. The other code blocks look the same, so either trac controls the colors or it's using different colorizers.