Last active
April 3, 2022 17:19
-
-
Save angeloxx/1f897251bb49f6f84b959a7dc21dfc82 to your computer and use it in GitHub Desktop.
Unix Syntax Hightligher Brush
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* SyntaxHighlighter Brush for Command Line Interface | |
* Author: Angelo Conforti | |
* License: GPL-2 | GPL-3 | |
*/ | |
SyntaxHighlighter.brushes.cli = function() | |
{ | |
this.regexList = [ | |
{ regex: SyntaxHighlighter.regexLib.singleLinePerlComments, css: 'comments' }, | |
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, | |
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, | |
{ regex: SyntaxHighlighter.regexLib.url, css: 'color1' }, | |
{ regex: /^[\[\]][\w @\/\\:\-\.~\(\)\[\]]*?(>|>|\#|\$|%)+/gm, css: 'functions' }, | |
]; | |
}; | |
SyntaxHighlighter.brushes.cli.prototype = new SyntaxHighlighter.Highlighter(); | |
SyntaxHighlighter.brushes.cli.aliases = ['cli', 'cmd-prompt', 'shell-prompt']; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment