✨ 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>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.jslibrary is https://highlightjs.org/. - The
highlight.jsGitHub project: https://github.com/highlightjs/highlight.js - Learn more about Splunk search processing language: https://docs.splunk.com/Splexicon:SPL
