✨ Splunk Search Processing Language for highlight.js
Simply include the highlight.js
library in your webpage or Node app, then load this module.
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>
jsDelivr
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/styles/default.min.css">
<script src="https://cdn.jsdelivr.net/gh/highlightjs/[email protected]/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/[email protected]/styles/default.min.css">
<script src="https://unpkg.com/@highlightjs/[email protected]/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>
- More info: https://unpkg.com
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();
highlight.js
is released under the MIT License. See LICENSE file for details.
Wei Su [email protected]
- The official site for the
highlight.js
library is https://highlightjs.org/. - The
highlight.js
GitHub project: https://github.com/highlightjs/highlight.js - Learn more about Splunk search processing language: https://docs.splunk.com/Splexicon:SPL