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
v4.0 -- SQL highlighter issues #244
Comments
Hi @petr-hybler thanks for your report, i've moved your issue yesterday to the EnlighterJS library repository - it has been fixed asap in if it doesn't work in your case please provide a full code snipped to reproduce the error |
hmm.. it looks like expected... figure 1: "desc" is a keyword, therefore the other highlighting appears the general problem with "sql" is that it has normally be split into multiple dialects to cover all use cases (i'm primarily working/testing with mariadb/mysql syntax). |
the currently used language rules can be found here: https://github.com/EnlighterJS/EnlighterJS/blob/master/src/lang/sql.js |
figure 1: desc is ok .. but how about the NOT NULL ? or highlighted name of the table? same like VARCHAR2 in the next figures ... it's not bold and sometimes highlighted :( |
there rule |
btw. the old language support file: https://github.com/EnlighterJS/EnlighterJS/blob/v2-legacy/Source/Language/Sql.js |
that looks way better imo :) thx ... btw is there still the option to set a default language as it was previously? or not anymore? |
it has been added as "fallback language" option in v4.1 (Enlighter -> Options -> Advanced -> EnlighterJS). but this setting is normally not needed because the shortcodes/markdown/gutenberg/tinymce are setting the language attribute explicitly - whats your intention to use it ? in the previous versions there were a lot of misunderstandings by the users who didn't know what this setting really does. |
all my codes are SQL only :) so it would be nice to have this language "by default" and not to pick it everytime manually (am posting a lot of articles) - that's kinda bother ... not a big deal tho |
that's the issue ;) the "default" setting doesn't set any language select boxes even in the legacy versions |
the changes have been applied to EnlighterJS |
hello the single line comments are not working properly ... when there is a single quote it treats it as a string even tho it's just a comment
example:
-- some data and ' this is treated as a string ....
The text was updated successfully, but these errors were encountered: