Knowledge Management

Has anyone created a custom SPL language file for the Confluence code block macro?

cdoebert
Path Finder

I'm looking to add SPL snippets to our Confluence pages, and it would be nice to have the correct highlighting.

Is this something anyone's already written for the code block macro? If Splunk has done this internally, can this be shared?

Tags (1)

haraksin
Path Finder

This extension has a community one that is based on the tmLanguage spec: https://github.com/arcsector/vscode-splunk-search-syntax/blob/master/syntaxes/splunk_search.JSON-tmL...

The catch is you'd have to convert it into the SyntaxHighlighter spec here, which atlassian uses: https://github.com/syntaxhighlighter/syntaxhighlighter/wiki 

Hope this helps.

0 Karma

anantcd
Explorer

There's a workaround which you can try.
Use this Web-Based (or App Installed on Splunk instance) SPL highlighter: https://chrisyounger.github.io/highlighter/appserver/static/
Then, use Action: "Copy as HTML" and paste the content inside Confluence HTML Macro.
Works for me on Confluence Cloud.

Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...