Closed mythical-programmer closed 5 years ago
Huh, how about that. I'll try and take a look at this when I have time, but it's not a project I'm very active on. Anyone reading this is welcome to take a stab at it.
ps, sorry about the slow response, I was somehow not getting notifications of these issues.
It works with by changing language
in kernel_json
(in setup.py) from 'postgresql'
to 'sql'
.
Of course, you don’t get all the PostgreSQL specific syntax highlights, only standard SQL highlights. But that’s not really a problem, because Pygments, the library used for highlighting, doesn’t seem to add much PostgreSQL specific syntax, it doesn’t support WITH
, for example.
The second cell issue itself is probably due to Jupyter because when I ask for Pygments to parse PostgreSQL two times using a same instance of PostgresLexer
, it works correctly.
For an unknown reason, it also sometimes happen that a cell with 'sql'
language does not get highlighted. Just save the notebook and reload the page…
Nice. Want to send a pull request? I'd be happy to merge it.
PR in #8.
Fix seems to be working in version 0.2.1
The syntax highlight of SQL for the 1st cell is fine. But the highlight doesn't work from the 2nd cell onwards.