Skip to content

Commit a0b3058

Browse files
author
Giannis Karagiannis
committed
Replace with single quotes
1 parent 240a682 commit a0b3058

File tree

1 file changed

+19
-23
lines changed

1 file changed

+19
-23
lines changed

syntaxhighlighter3/scripts/shBrushGo.js

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,36 +16,32 @@
1616
*/
1717
(function () {
1818
// CommonJS
19-
SyntaxHighlighter =
20-
SyntaxHighlighter ||
21-
(typeof require !== "undefined"
22-
? require("shCore").SyntaxHighlighter
23-
: null);
19+
SyntaxHighlighter = SyntaxHighlighter || (typeof require !== 'undefined'? require('shCore').SyntaxHighlighter : null);
2420

2521
function Brush() {
2622
var keywords =
27-
"bool break byte case chan complex128 complex64 const continue default defer else " +
28-
"fallthrough float32 float64 for func go goto if import int int16 int32 int64 int8 " +
29-
"interface map package range return rune select string struct switch type uint " +
30-
"uint16 uint32 uint64 uint8 uintptr var";
23+
'bool break byte case chan complex128 complex64 const continue default defer else ' +
24+
'fallthrough float32 float64 for func go goto if import int int16 int32 int64 int8 ' +
25+
'interface map package range return rune select string struct switch type uint ' +
26+
'uint16 uint32 uint64 uint8 uintptr var';
3127
var funcs =
32-
"append cap close complex copy imag len make new panic print println real recover delete";
33-
var special = "true false iota nil";
28+
'append cap close complex copy imag len make new panic print println real recover delete';
29+
var special = 'true false iota nil';
3430

3531
this.regexList = [
3632
{
3733
regex: SyntaxHighlighter.regexLib.singleLineCComments,
38-
css: "comments",
34+
css: 'comments',
3935
}, // one line comments
40-
{ regex: /\/\*([^\*][\s\S]*?)?\*\//gm, css: "comments" }, // multiline comments
41-
{ regex: /\/\*(?!\*\/)\*[\s\S]*?\*\//gm, css: "preprocessor" }, // documentation comments
42-
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: "string" }, // strings
43-
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: "string" }, // strings
44-
{ regex: XRegExp("`([^\\\\`]|\\\\.)*`", "gs"), css: "string" }, // strings
45-
{ regex: /\b([\d]+(\.[\d]+)?|0x[a-f0-9]+)\b/gi, css: "value" }, // numbers
46-
{ regex: new RegExp(this.getKeywords(keywords), "gm"), css: "keyword" }, // keywords
47-
{ regex: new RegExp(this.getKeywords(funcs), "gmi"), css: "functions" }, // built-in functions
48-
{ regex: new RegExp(this.getKeywords(special), "gm"), css: "color1" }, // literals
36+
{ regex: /\/\*([^\*][\s\S]*?)?\*\//gm, css: 'comments' }, // multiline comments
37+
{ regex: /\/\*(?!\*\/)\*[\s\S]*?\*\//gm, css: 'preprocessor' }, // documentation comments
38+
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings
39+
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
40+
{ regex: XRegExp('`([^\\\\`]|\\\\.)*`', 'gs'), css: 'string' }, // strings
41+
{ regex: /\b([\d]+(\.[\d]+)?|0x[a-f0-9]+)\b/gi, css: 'value' }, // numbers
42+
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // keywords
43+
{ regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'functions' }, // built-in functions
44+
{ regex: new RegExp(this.getKeywords(special), 'gm'), css: 'color1' }, // literals
4945
];
5046

5147
this.forHtmlScript({
@@ -55,10 +51,10 @@
5551
}
5652

5753
Brush.prototype = new SyntaxHighlighter.Highlighter();
58-
Brush.aliases = ["go", "golang"];
54+
Brush.aliases = ['go', 'golang'];
5955

6056
SyntaxHighlighter.brushes.Go = Brush;
6157

6258
// CommonJS
63-
typeof exports != "undefined" ? (exports.Brush = Brush) : null;
59+
typeof exports != 'undefined' ? (exports.Brush = Brush) : null;
6460
})();

0 commit comments

Comments
 (0)