highlightjs / highlight.js

JavaScript syntax highlighter with language auto-detection and zero dependencies.
https://highlightjs.org/
BSD 3-Clause "New" or "Revised" License
23.3k stars 3.52k forks source link

Implemented MySQL grammar #4000

Closed FightRay closed 3 months ago

FightRay commented 4 months ago

Implemented a new language grammar for the latest MySQL version, compiled from the official mysql docs.

Changes

Added mysql.js Added detection test default.txt

Checklist

FightRay commented 4 months ago

Where do I add: hljs.registerLanguage('mysql', require('./languages/mysql')); ? Couldn't find index.js in the source files

joshgoebel commented 4 months ago

Please read all our docs on this, they are quite detailed.

You'd be contributing a 3rd party grammar - and need to act as it's maintainer in the future.

If you have any questions after you've reviewed the grammar contributor guidelines, feel free to continue to ask here.

joshgoebel commented 3 months ago

Would be awesome to finally have MySQL as a 3rd party grammar. Closing this PR but hoping you'll make a repo for this grammar and then open a new PR to get it added to SUPPORTED_LANGUAGES. Good luck.