Skip to content

Commit

Permalink
register the cql lang with sql (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
colegoldsmith authored Mar 12, 2024
1 parent 07ccace commit 6daadb0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion preview-src/asciidoc/code.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor i

=== Text formatting (variables)

[source,sql,subs="verbatim,quotes"]
[source,cql,subs="verbatim,quotes"]
----
DESCRIBE **KEYSPACE_NAME**.**TABLE_NAME**
----
Expand Down
6 changes: 5 additions & 1 deletion src/js/vendor/highlight.bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

var hljs = require('highlight.js/lib/highlight')
var hljsCurl = require('highlightjs-curl')
var sql = require('highlight.js/lib/languages/sql')

hljs.registerLanguage('asciidoc', require('highlight.js/lib/languages/asciidoc'))
hljs.registerLanguage('bash', require('highlight.js/lib/languages/bash'))
Expand Down Expand Up @@ -35,11 +36,14 @@
hljs.registerLanguage('rust', require('highlight.js/lib/languages/rust'))
hljs.registerLanguage('scala', require('highlight.js/lib/languages/scala'))
hljs.registerLanguage('shell', require('highlight.js/lib/languages/shell'))
hljs.registerLanguage('sql', require('highlight.js/lib/languages/sql'))
hljs.registerLanguage('sql', sql)
// Use SQL highlighter for CQL
hljs.registerLanguage('cql', sql)
hljs.registerLanguage('swift', require('highlight.js/lib/languages/swift'))
hljs.registerLanguage('typescript', require('highlight.js/lib/languages/typescript'))
hljs.registerLanguage('xml', require('highlight.js/lib/languages/xml'))
hljs.registerLanguage('yaml', require('highlight.js/lib/languages/yaml'))

;[].slice.call(document.querySelectorAll('pre code.hljs[data-lang]')).forEach(function (node) {
hljs.highlightBlock(node)
})
Expand Down

0 comments on commit 6daadb0

Please sign in to comment.