Before using Octopress I have been using GetSimple as my side framework. Therefore, I needed a wireshark highlight plugin for it. GetSimple is using SyntaxHighlighter and therefore I had to write a brush for myself. Maybe I need it in the future or somebody gets it upstream, so here it is:

shBruchWSRAW.js

;(
    function(){
        typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null;

        function Brush(){
            var r = SyntaxHighlighter.regexLib;
            this.regexList = [
                { regex: /^[\da-fA-F]+/gm, css: 'keyword'},
                { regex: /([\da-fA-F]{2}\s)+\s/gm, css: 'comments'}
            ];
            this.forHtmlScript(r.scriptScriptTags);
        };

        Brush.prototype = new SyntaxHighlighter.Highlighter();
        Brush.aliases   = ['wsraw', 'wireshark', 'wiresharkraw'];
        SyntaxHighlighter.brushes.WSRAW = Brush;
        typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
    }
)();

Published

Category

snippets

Tags