SHExBrushes Exemple
SyntaxHighlighter Extended Brushes.
Original HTML brush
<meta charset="utf-8"> <!-- meta tag --> <header class="navbar" role="banner"> <!-- Common tag --> <ul class="nav"><li></li></ul> <!-- List tag --> <a href="/">Home</a> <!-- Anchor tag --> <script src="/some_script.js"></script> <!-- Script tag --> <form action="page.html" method="post"> <!-- Form tag --> <table class="table"><tr><td></td></tr></table> <!-- Table tag -->
SHEx HTML brush
<meta charset="utf-8"> <!-- meta tag --> <header class="navbar" role="banner"> <!-- Common tag --> <ul class="nav"><li></li></ul> <!-- List tag --> <a href="/">Home</a> <!-- Anchor tag --> <script src="/some_script.js"></script> <!-- Script tag --> <form action="page.html" method="post"> <!-- Form tag --> <table class="table"><tr><td></td></tr></table> <!-- Table tag -->
Original PHP brush
class someClass extends otherClass { function __construct($request) { parent::__construct($request); } if(isset($this->request)) : endif; $array = array(); $array['element'] = "string"; $array['number'] = 99.9; $array['string_number'] = '100'; if (false === $array['id'] || !is_numeric($array['id'])) { echo __NAMESPACE__; } }
SHEx PHP brush
class someClass extends otherClass { function __construct($request) { parent::__construct($request); } if(isset($this->request)) : endif; $array = array(); $array['element'] = "string"; $array['number'] = 99.9; $array['string_number'] = '100'; if (false === $array['id'] || !is_numeric($array['id'])) { echo __NAMESPACE__; } }
Original CSS brush
@media (min-width: 992px) { #some_id { box-shadow: 0px 1px 1px rgba(0,0,0,0.3); background: linear-gradient(top, rgba(0,171,186,1) 0%,rgba(0,115,125,1) 100%); } } .some_class { padding: 15px; border-radius: 4px; animation: anim1 0.6s ease-in 0.8s both; transition: all 0.2s ease-in-out; } @keyframes anim1 { 0% { right: 110%; opacity: 0; } 100% { right: 10%; opacity: 1; } }
SHEx CSS brush
@media (min-width: 992px) { #some_id { box-shadow: 0px 1px 1px rgba(0,0,0,0.3); background: linear-gradient(top, rgba(0,171,186,1) 0%,rgba(0,115,125,1) 100%); } } .some_class { padding: 15px; border-radius: 4px; animation: anim1 0.6s ease-in 0.8s both; transition: all 0.2s ease-in-out; } @keyframes anim1 { 0% { right: 110%; opacity: 0; } 100% { right: 10%; opacity: 1; } }
Original JS brush
typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null; function Brush() { this.regexList = [ { regex: /\b-?[0-9]+((\.[0-9]+)+)?\b/g }, { regex: new RegExp(this.get(key), 'g') } ]; }; var someVar = 'some string' + someVar2; var otherVar = 99.9;
SHEx JS brush
typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null; function Brush() { this.regexList = [ { regex: /\b-?[0-9]+((\.[0-9]+)+)?\b/g }, { regex: new RegExp(this.get(key), 'g') } ]; }; var someVar = 'some string' + someVar2; var otherVar = 99.9;