Skip to content

✨ highlight.js syntax definition for the Splunk search processing language (SPL)

License

Notifications You must be signed in to change notification settings

swsoyee/highlightjs-spl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

✨ Splunk Search Processing Language for highlight.js

npm version license npm download

exmaple

Usage

Simply include the highlight.js library in your webpage or Node app, then load this module.

Static website or simple usage

Simply load the module after loading highlight.js. You'll use the minified version found in the dist directory. This module is just a CDN build of the language, so it will register itself as the Javascript is loaded.

<script type="text/javascript" src="/path/to/highlight.min.js"></script>
<script type="text/javascript" src="/path/to/spl.min.js"></script>
<script type="text/javascript">
  hljs.highlightAll();
</script>

Using directly from the CDN

jsDelivr

<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.7.1/build/styles/default.min.css">
<script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@10.7.1/build/highlight.min.js"></script>
<!-- load syntax definition for Splunk search processing language -->
<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/swsoyee/highlightjs-spl/dist/spl.min.js"></script>

unpkg

<link rel="stylesheet" href="https://unpkg.com/@highlightjs/cdn-assets@10.7.1/styles/default.min.css">
<script src="https://unpkg.com/@highlightjs/cdn-assets@10.7.1/highlight.min.js"></script>
<!-- load syntax definition for Splunk search processing language -->
<script type="text/javascript" src="https://unpkg.com/highlightjs-spl/dist/spl.min.js"></script>

With Node or another build system

If you're using Node / Webpack / Rollup / Browserify, etc, simply require the language module, then register it with Highlight.js.

var hljs = require('highlight.js');
var hljsSpl = require('highlightjs-spl');

hljs.registerLanguage("spl", hljsSpl);
hljs.initHighlightingOnLoad();

License

highlight.js is released under the MIT License. See LICENSE file for details.

Author

Wei Su swsoyee@gmail.com

Links