shatteredsilicon / ssm-submodules

GNU Affero General Public License v3.0
0 stars 2 forks source link

SQL Colour Coding Highlight on Stored Procedures #183

Open gordan-bobic opened 11 months ago

gordan-bobic commented 11 months ago

It looks like CREATE PROCEDURE statements returned in QAN are not colour coded like regular statements and CREATE TABLE definitions.

Is there a way we can apply the highlight to them to make them easier to skim-read?

oblitorum commented 10 months ago

I notice that the highlighting doesn't always fail, for example

2023-10-13 00_42_24-package json - qan-app  WSL_ Ubuntu-20 04  - Visual Studio Code

2023-10-13 00_41_48-

One works but not the other, seems it fails on more complex CREATE PROCEDURE queries.

The highlighting is done with a npm package -> highlight.js, I changed the way the code gets highlighted, now the complex one also gets highlighted

image

I think this will probably fix your case too, but I also notice that the "BEGIN" keyword is not highlighted like other keywords at above screenshot, it feels like the highlight feature this npm package provided is not very promising (at least at the version we used, which is 10.4.1)

gordan-bobic commented 10 months ago

Fair enough, if you can fix it easily, please try to upstream the patch. It isn't a massive problem that will prevent the next release. I'll relabel this as "upstream" in terms of release.