Skip to content

Commit 519141d

Browse files
committed
Minor fixes. Still not working.
1 parent 201d0ff commit 519141d

File tree

9 files changed

+223
-205
lines changed

9 files changed

+223
-205
lines changed

codepress.js

Lines changed: 121 additions & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -1,137 +1,139 @@
11
/*
22
* CodePress - Real Time Syntax Highlighting Editor written in JavaScript - http://codepress.org/
3-
*
3+
*
44
* Copyright (C) 2006 Fernando M.A.d.S. <[email protected]>
55
*
6-
* This program is free software; you can redistribute it and/or modify it under the terms of the
6+
* This program is free software; you can redistribute it and/or modify it under the terms of the
77
* GNU Lesser General Public License as published by the Free Software Foundation.
8-
*
8+
*
99
* Read the full licence: http://www.opensource.org/licenses/lgpl-license.php
1010
*/
1111

1212
CodePress = function(obj) {
13-
var self = document.createElement('iframe');
14-
self.textarea = obj;
15-
self.textarea.disabled = true;
16-
self.textarea.style.overflow = 'hidden';
17-
self.style.height = self.textarea.clientHeight +'px';
18-
self.style.width = self.textarea.clientWidth +'px';
19-
self.textarea.style.overflow = 'auto';
20-
self.style.border = '1px solid gray';
21-
self.frameBorder = 0; // remove IE internal iframe border
22-
self.style.visibility = 'hidden';
23-
self.style.position = 'absolute';
24-
self.options = self.textarea.className;
25-
26-
self.initialize = function() {
27-
self.editor = self.contentWindow.CodePress;
28-
self.editor.body = self.contentWindow.document.getElementsByTagName('body')[0];
29-
self.editor.setCode(self.textarea.value);
30-
self.setOptions();
31-
self.editor.syntaxHighlight('init');
32-
self.textarea.style.display = 'none';
33-
self.style.position = 'static';
34-
self.style.visibility = 'visible';
35-
self.style.display = 'inline';
36-
}
37-
38-
// obj can by a textarea id or a string (code)
39-
self.edit = function(obj,language) {
40-
if(obj) self.textarea.value = document.getElementById(obj) ? document.getElementById(obj).value : obj;
41-
if(!self.textarea.disabled) return;
42-
self.language = language ? language : self.getLanguage();
43-
self.src = CodePress.path+'codepress.html?language='+self.language+'&ts='+(new Date).getTime();
44-
if(self.attachEvent) self.attachEvent('onload',self.initialize);
45-
else self.addEventListener('load',self.initialize,false);
46-
}
47-
48-
self.getLanguage = function() {
49-
for (language in CodePress.languages)
50-
if(self.options.match('\\b'+language+'\\b'))
51-
return CodePress.languages[language] ? language : 'generic';
52-
}
53-
54-
self.setOptions = function() {
55-
if(self.options.match('autocomplete-off')) self.toggleAutoComplete();
56-
if(self.options.match('readonly-on')) self.toggleReadOnly();
57-
if(self.options.match('linenumbers-off')) self.toggleLineNumbers();
58-
}
59-
60-
self.getCode = function() {
61-
return self.textarea.disabled ? self.editor.getCode() : self.textarea.value;
62-
}
63-
64-
self.setCode = function(code) {
65-
self.textarea.disabled ? self.editor.setCode(code) : self.textarea.value = code;
66-
}
67-
68-
self.toggleAutoComplete = function() {
69-
self.editor.autocomplete = (self.editor.autocomplete) ? false : true;
70-
}
71-
72-
self.toggleReadOnly = function() {
73-
self.textarea.readOnly = (self.textarea.readOnly) ? false : true;
74-
if(self.style.display != 'none') // prevent exception on FF + iframe with display:none
75-
self.editor.readOnly(self.textarea.readOnly ? true : false);
76-
}
77-
78-
self.toggleLineNumbers = function() {
79-
var cn = self.editor.body.className;
80-
self.editor.body.className = (cn==''||cn=='show-line-numbers') ? 'hide-line-numbers' : 'show-line-numbers';
81-
}
82-
83-
self.toggleEditor = function() {
84-
if(self.textarea.disabled) {
85-
self.textarea.value = self.getCode();
86-
self.textarea.disabled = false;
87-
self.style.display = 'none';
88-
self.textarea.style.display = 'inline';
89-
}
90-
else {
91-
self.textarea.disabled = true;
92-
self.setCode(self.textarea.value);
93-
self.editor.syntaxHighlight('init');
94-
self.style.display = 'inline';
95-
self.textarea.style.display = 'none';
96-
}
97-
}
98-
99-
self.edit();
100-
return self;
13+
var self = document.createElement('iframe');
14+
self.textarea = obj;
15+
self.textarea.disabled = true;
16+
self.textarea.style.overflow = 'hidden';
17+
self.style.height = self.textarea.clientHeight +'px';
18+
self.style.width = self.textarea.clientWidth +'px';
19+
self.textarea.style.overflow = 'auto';
20+
self.style.border = '1px solid gray';
21+
self.frameBorder = 0; // remove IE internal iframe border
22+
self.style.visibility = 'hidden';
23+
self.style.position = 'absolute';
24+
self.options = self.textarea.className;
25+
26+
self.initialize = function() {
27+
self.editor = self.contentWindow.CodePress;
28+
self.editor.body = self.contentWindow.document.getElementsByTagName('body')[0];
29+
self.editor.setCode(self.textarea.value);
30+
self.setOptions();
31+
self.editor.syntaxHighlight('init');
32+
self.textarea.style.display = 'none';
33+
self.style.position = 'static';
34+
self.style.visibility = 'visible';
35+
self.style.display = 'inline';
36+
}
37+
38+
// obj can by a textarea id or a string (code)
39+
self.edit = function(obj,language) {
40+
if(obj) self.textarea.value = document.getElementById(obj) ? document.getElementById(obj).value : obj;
41+
if(!self.textarea.disabled) return;
42+
self.language = language ? language : self.getLanguage();
43+
self.src = CodePress.path+'codepress.html?language='+self.language+'&ts='+(new Date).getTime();
44+
if(self.attachEvent) self.attachEvent('onload',self.initialize);
45+
else self.addEventListener('load',self.initialize,false);
46+
}
47+
48+
self.getLanguage = function() {
49+
for (language in CodePress.languages) {
50+
if(self.options.match('\\b'+language+'\\b')) {
51+
return CodePress.languages[language] ? language : 'generic';
52+
}
53+
}
54+
}
55+
56+
self.setOptions = function() {
57+
if(self.options.match('autocomplete-off')) self.toggleAutoComplete();
58+
if(self.options.match('readonly-on')) self.toggleReadOnly();
59+
if(self.options.match('linenumbers-off')) self.toggleLineNumbers();
60+
}
61+
62+
self.getCode = function() {
63+
return self.textarea.disabled ? self.editor.getCode() : self.textarea.value;
64+
}
65+
66+
self.setCode = function(code) {
67+
self.textarea.disabled ? self.editor.setCode(code) : self.textarea.value = code;
68+
}
69+
70+
self.toggleAutoComplete = function() {
71+
self.editor.autocomplete = (self.editor.autocomplete) ? false : true;
72+
}
73+
74+
self.toggleReadOnly = function() {
75+
self.textarea.readOnly = (self.textarea.readOnly) ? false : true;
76+
if(self.style.display != 'none') // prevent exception on FF + iframe with display:none
77+
self.editor.readOnly(self.textarea.readOnly ? true : false);
78+
}
79+
80+
self.toggleLineNumbers = function() {
81+
var cn = self.editor.body.className;
82+
self.editor.body.className = (cn==''||cn=='show-line-numbers') ? 'hide-line-numbers' : 'show-line-numbers';
83+
}
84+
85+
self.toggleEditor = function() {
86+
if(self.textarea.disabled) {
87+
self.textarea.value = self.getCode();
88+
self.textarea.disabled = false;
89+
self.style.display = 'none';
90+
self.textarea.style.display = 'inline';
91+
}
92+
else {
93+
self.textarea.disabled = true;
94+
self.setCode(self.textarea.value);
95+
self.editor.syntaxHighlight('init');
96+
self.style.display = 'inline';
97+
self.textarea.style.display = 'none';
98+
}
99+
}
100+
101+
self.edit();
102+
return self;
101103
}
102104

103-
CodePress.languages = {
104-
csharp : 'C#',
105-
css : 'CSS',
106-
generic : 'Generic',
107-
html : 'HTML',
108-
java : 'Java',
109-
javascript : 'JavaScript',
110-
perl : 'Perl',
111-
ruby : 'Ruby',
112-
php : 'PHP',
113-
text : 'Text',
114-
sql : 'SQL',
115-
vbscript : 'VBScript'
105+
CodePress.languages = {
106+
csharp : 'C#',
107+
css : 'CSS',
108+
generic : 'Generic',
109+
html : 'HTML',
110+
java : 'Java',
111+
javascript : 'JavaScript',
112+
perl : 'Perl',
113+
ruby : 'Ruby',
114+
php : 'PHP',
115+
text : 'Text',
116+
sql : 'SQL',
117+
vbscript : 'VBScript'
116118
}
117119

118120

119121
CodePress.run = function() {
120-
s = document.getElementsByTagName('script');
121-
for(var i=0,n=s.length;i<n;i++) {
122-
if(s[i].src.match('codepress.js')) {
123-
CodePress.path = s[i].src.replace('codepress.js','');
124-
}
125-
}
126-
t = document.getElementsByTagName('textarea');
127-
for(var i=0,n=t.length;i<n;i++) {
128-
if(t[i].className.match('codepress')) {
129-
id = t[i].id;
130-
t[i].id = id+'_cp';
131-
eval(id+' = new CodePress(t[i])');
132-
t[i].parentNode.insertBefore(eval(id), t[i]);
133-
}
134-
}
122+
s = document.getElementsByTagName('script');
123+
for(var i=0,n=s.length;i<n;i++) {
124+
if(s[i].src.match('codepress.js')) {
125+
CodePress.path = s[i].src.replace('codepress.js','');
126+
}
127+
}
128+
t = document.getElementsByTagName('textarea');
129+
for(var i=0,n=t.length;i<n;i++) {
130+
if(t[i].className.match('codepress')) {
131+
id = t[i].id;
132+
t[i].id = id+'_cp';
133+
eval(id+' = new CodePress(t[i])');
134+
t[i].parentNode.insertBefore(eval(id), t[i]);
135+
}
136+
}
135137
}
136138

137139
if(window.attachEvent) window.attachEvent('onload',CodePress.run);

languages/asp.js

Lines changed: 44 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -2,59 +2,61 @@
22
* CodePress regular expressions for ASP-vbscript syntax highlighting
33
*/
44

5+
var Language = {};
6+
57
// ASP VBScript
68
Language.syntax = [
79
// all tags
8-
{ input : /(&lt;[^!%|!%@]*?&gt;)/g, output : '<b>$1</b>' },
9-
// style tags
10-
{ input : /(&lt;style.*?&gt;)(.*?)(&lt;\/style&gt;)/g, output : '<em>$1</em><em>$2</em><em>$3</em>' },
11-
// script tags
12-
{ input : /(&lt;script.*?&gt;)(.*?)(&lt;\/script&gt;)/g, output : '<ins>$1</ins><ins>$2</ins><ins>$3</ins>' },
10+
{ input : /(&lt;[^!%|!%@]*?&gt;)/g, output : '<b>$1</b>' },
11+
// style tags
12+
{ input : /(&lt;style.*?&gt;)(.*?)(&lt;\/style&gt;)/g, output : '<em>$1</em><em>$2</em><em>$3</em>' },
13+
// script tags
14+
{ input : /(&lt;script.*?&gt;)(.*?)(&lt;\/script&gt;)/g, output : '<ins>$1</ins><ins>$2</ins><ins>$3</ins>' },
1315
// strings "" and attributes
14-
{ input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>' },
16+
{ input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>' },
1517
// ASP Comment
16-
{ input : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<dfn>\'$1$2</dfn>'},
18+
{ input : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<dfn>\'$1$2</dfn>'},
1719
// <%.*
18-
{ input : /(&lt;%)/g, output : '<strong>$1' },
19-
// .*%>
20-
{ input : /(%&gt;)/g, output : '$1</strong>' },
21-
// <%@...%>
22-
{ input : /(&lt;%@)(.+?)(%&gt;)/gi, output : '$1<span>$2</span>$3' },
23-
//Numbers
24-
{ input : /\b([\d]+)\b/g, output : '<var>$1</var>' },
20+
{ input : /(&lt;%)/g, output : '<strong>$1' },
21+
// .*%>
22+
{ input : /(%&gt;)/g, output : '$1</strong>' },
23+
// <%@...%>
24+
{ input : /(&lt;%@)(.+?)(%&gt;)/gi, output : '$1<span>$2</span>$3' },
25+
//Numbers
26+
{ input : /\b([\d]+)\b/g, output : '<var>$1</var>' },
2527
// Reserved Words 1 (Blue)
26-
{ input : /\b(And|As|ByRef|ByVal|Call|Case|Class|Const|Dim|Do|Each|Else|ElseIf|Empty|End|Eqv|Exit|False|For|Function)\b/gi, output : '<a>$1</a>' },
27-
{ input : /\b(Get|GoTo|If|Imp|In|Is|Let|Loop|Me|Mod|Enum|New|Next|Not|Nothing|Null|On|Option|Or|Private|Public|ReDim|Rem)\b/gi, output : '<a>$1</a>' },
28-
{ input : /\b(Resume|Select|Set|Stop|Sub|Then|To|True|Until|Wend|While|With|Xor|Execute|Randomize|Erase|ExecuteGlobal|Explicit|step)\b/gi, output : '<a>$1</a>' },
29-
// Reserved Words 2 (Purple)
30-
{ input : /\b(Abandon|Abs|AbsolutePage|AbsolutePosition|ActiveCommand|ActiveConnection|ActualSize|AddHeader|AddNew|AppendChunk)\b/gi, output : '<u>$1</u>' },
31-
{ input : /\b(AppendToLog|Application|Array|Asc|Atn|Attributes|BeginTrans|BinaryRead|BinaryWrite|BOF|Bookmark|Boolean|Buffer|Byte)\b/gi, output : '<u>$1</u>' },
32-
{ input : /\b(CacheControl|CacheSize|Cancel|CancelBatch|CancelUpdate|CBool|CByte|CCur|CDate|CDbl|Charset|Chr|CInt|Clear)\b/gi, output : '<u>$1</u>' },
33-
{ input : /\b(ClientCertificate|CLng|Clone|Close|CodePage|CommandText|CommandType|CommandTimeout|CommitTrans|CompareBookmarks|ConnectionString|ConnectionTimeout)\b/gi, output : '<u>$1</u>' },
34-
{ input : /\b(Contents|ContentType|Cookies|Cos|CreateObject|CreateParameter|CSng|CStr|CursorLocation|CursorType|DataMember|DataSource|Date|DateAdd|DateDiff)\b/gi, output : '<u>$1</u>' },
35-
{ input : /\b(DatePart|DateSerial|DateValue|Day|DefaultDatabase|DefinedSize|Delete|Description|Double|EditMode|Eof|EOF|err|Error)\b/gi, output : '<u>$1</u>' },
36-
{ input : /\b(Exp|Expires|ExpiresAbsolute|Filter|Find|Fix|Flush|Form|FormatCurrency|FormatDateTime|FormatNumber|FormatPercent)\b/gi, output : '<u>$1</u>' },
37-
{ input : /\b(GetChunk|GetLastError|GetRows|GetString|Global|HelpContext|HelpFile|Hex|Hour|HTMLEncode|IgnoreCase|Index|InStr|InStrRev)\b/gi, output : '<u>$1</u>' },
38-
{ input : /\b(Int|Integer|IsArray|IsClientConnected|IsDate|IsolationLevel|Join|LBound|LCase|LCID|Left|Len|Lock|LockType|Log|Long|LTrim)\b/gi, output : '<u>$1</u>' },
39-
{ input : /\b(MapPath|MarshalOptions|MaxRecords|Mid|Minute|Mode|Month|MonthName|Move|MoveFirst|MoveLast|MoveNext|MovePrevious|Name|NextRecordset)\b/gi, output : '<u>$1</u>' },
40-
{ input : /\b(Now|Number|NumericScale|ObjectContext|Oct|Open|OpenSchema|OriginalValue|PageCount|PageSize|Pattern|PICS|Precision|Prepared|Property)\b/gi, output : '<u>$1</u>' },
41-
{ input : /\b(Provider|QueryString|RecordCount|Redirect|RegExp|Remove|RemoveAll|Replace|Requery|Request|Response|Resync|Right|Rnd)\b/gi, output : '<u>$1</u>' },
42-
{ input : /\b(RollbackTrans|RTrim|Save|ScriptTimeout|Second|Seek|Server|ServerVariables|Session|SessionID|SetAbort|SetComplete|Sgn)\b/gi, output : '<u>$1</u>' },
28+
{ input : /\b(And|As|ByRef|ByVal|Call|Case|Class|Const|Dim|Do|Each|Else|ElseIf|Empty|End|Eqv|Exit|False|For|Function)\b/gi, output : '<a>$1</a>' },
29+
{ input : /\b(Get|GoTo|If|Imp|In|Is|Let|Loop|Me|Mod|Enum|New|Next|Not|Nothing|Null|On|Option|Or|Private|Public|ReDim|Rem)\b/gi, output : '<a>$1</a>' },
30+
{ input : /\b(Resume|Select|Set|Stop|Sub|Then|To|True|Until|Wend|While|With|Xor|Execute|Randomize|Erase|ExecuteGlobal|Explicit|step)\b/gi, output : '<a>$1</a>' },
31+
// Reserved Words 2 (Purple)
32+
{ input : /\b(Abandon|Abs|AbsolutePage|AbsolutePosition|ActiveCommand|ActiveConnection|ActualSize|AddHeader|AddNew|AppendChunk)\b/gi, output : '<u>$1</u>' },
33+
{ input : /\b(AppendToLog|Application|Array|Asc|Atn|Attributes|BeginTrans|BinaryRead|BinaryWrite|BOF|Bookmark|Boolean|Buffer|Byte)\b/gi, output : '<u>$1</u>' },
34+
{ input : /\b(CacheControl|CacheSize|Cancel|CancelBatch|CancelUpdate|CBool|CByte|CCur|CDate|CDbl|Charset|Chr|CInt|Clear)\b/gi, output : '<u>$1</u>' },
35+
{ input : /\b(ClientCertificate|CLng|Clone|Close|CodePage|CommandText|CommandType|CommandTimeout|CommitTrans|CompareBookmarks|ConnectionString|ConnectionTimeout)\b/gi, output : '<u>$1</u>' },
36+
{ input : /\b(Contents|ContentType|Cookies|Cos|CreateObject|CreateParameter|CSng|CStr|CursorLocation|CursorType|DataMember|DataSource|Date|DateAdd|DateDiff)\b/gi, output : '<u>$1</u>' },
37+
{ input : /\b(DatePart|DateSerial|DateValue|Day|DefaultDatabase|DefinedSize|Delete|Description|Double|EditMode|Eof|EOF|err|Error)\b/gi, output : '<u>$1</u>' },
38+
{ input : /\b(Exp|Expires|ExpiresAbsolute|Filter|Find|Fix|Flush|Form|FormatCurrency|FormatDateTime|FormatNumber|FormatPercent)\b/gi, output : '<u>$1</u>' },
39+
{ input : /\b(GetChunk|GetLastError|GetRows|GetString|Global|HelpContext|HelpFile|Hex|Hour|HTMLEncode|IgnoreCase|Index|InStr|InStrRev)\b/gi, output : '<u>$1</u>' },
40+
{ input : /\b(Int|Integer|IsArray|IsClientConnected|IsDate|IsolationLevel|Join|LBound|LCase|LCID|Left|Len|Lock|LockType|Log|Long|LTrim)\b/gi, output : '<u>$1</u>' },
41+
{ input : /\b(MapPath|MarshalOptions|MaxRecords|Mid|Minute|Mode|Month|MonthName|Move|MoveFirst|MoveLast|MoveNext|MovePrevious|Name|NextRecordset)\b/gi, output : '<u>$1</u>' },
42+
{ input : /\b(Now|Number|NumericScale|ObjectContext|Oct|Open|OpenSchema|OriginalValue|PageCount|PageSize|Pattern|PICS|Precision|Prepared|Property)\b/gi, output : '<u>$1</u>' },
43+
{ input : /\b(Provider|QueryString|RecordCount|Redirect|RegExp|Remove|RemoveAll|Replace|Requery|Request|Response|Resync|Right|Rnd)\b/gi, output : '<u>$1</u>' },
44+
{ input : /\b(RollbackTrans|RTrim|Save|ScriptTimeout|Second|Seek|Server|ServerVariables|Session|SessionID|SetAbort|SetComplete|Sgn)\b/gi, output : '<u>$1</u>' },
4345
{ input : /\b(Sin|Size|Sort|Source|Space|Split|Sqr|State|StaticObjects|Status|StayInSync|StrComp|String|StrReverse|Supports|Tan|Time)\b/gi, output : '<u>$1</u>' },
44-
{ input : /\b(Timeout|Timer|TimeSerial|TimeValue|TotalBytes|Transfer|Trim|Type|Type|UBound|UCase|UnderlyingValue|UnLock|Update|UpdateBatch)\b/gi, output : '<u>$1</u>' },
45-
{ input : /\b(URLEncode|Value|Value|Version|Weekday|WeekdayName|Write|Year)\b/gi, output : '<u>$1</u>' },
46+
{ input : /\b(Timeout|Timer|TimeSerial|TimeValue|TotalBytes|Transfer|Trim|Type|Type|UBound|UCase|UnderlyingValue|UnLock|Update|UpdateBatch)\b/gi, output : '<u>$1</u>' },
47+
{ input : /\b(URLEncode|Value|Value|Version|Weekday|WeekdayName|Write|Year)\b/gi, output : '<u>$1</u>' },
4648
// Reserved Words 3 (Turquis)
47-
{ input : /\b(vbBlack|vbRed|vbGreen|vbYellow|vbBlue|vbMagenta|vbCyan|vbWhite|vbBinaryCompare|vbTextCompare)\b/gi, output : '<i>$1</i>' },
48-
{ input : /\b(vbSunday|vbMonday|vbTuesday|vbWednesday|vbThursday|vbFriday|vbSaturday|vbUseSystemDayOfWeek)\b/gi, output : '<i>$1</i>' },
49-
{ input : /\b(vbFirstJan1|vbFirstFourDays|vbFirstFullWeek|vbGeneralDate|vbLongDate|vbShortDate|vbLongTime|vbShortTime)\b/gi, output : '<i>$1</i>' },
50-
{ input : /\b(vbObjectError|vbCr|VbCrLf|vbFormFeed|vbLf|vbNewLine|vbNullChar|vbNullString|vbTab|vbVerticalTab|vbUseDefault|vbTrue)\b/gi, output : '<i>$1</i>' },
51-
{ input : /\b(vbFalse|vbEmpty|vbNull|vbInteger|vbLong|vbSingle|vbDouble|vbCurrency|vbDate|vbString|vbObject|vbError|vbBoolean|vbVariant)\b/gi, output : '<i>$1</i>' },
49+
{ input : /\b(vbBlack|vbRed|vbGreen|vbYellow|vbBlue|vbMagenta|vbCyan|vbWhite|vbBinaryCompare|vbTextCompare)\b/gi, output : '<i>$1</i>' },
50+
{ input : /\b(vbSunday|vbMonday|vbTuesday|vbWednesday|vbThursday|vbFriday|vbSaturday|vbUseSystemDayOfWeek)\b/gi, output : '<i>$1</i>' },
51+
{ input : /\b(vbFirstJan1|vbFirstFourDays|vbFirstFullWeek|vbGeneralDate|vbLongDate|vbShortDate|vbLongTime|vbShortTime)\b/gi, output : '<i>$1</i>' },
52+
{ input : /\b(vbObjectError|vbCr|VbCrLf|vbFormFeed|vbLf|vbNewLine|vbNullChar|vbNullString|vbTab|vbVerticalTab|vbUseDefault|vbTrue)\b/gi, output : '<i>$1</i>' },
53+
{ input : /\b(vbFalse|vbEmpty|vbNull|vbInteger|vbLong|vbSingle|vbDouble|vbCurrency|vbDate|vbString|vbObject|vbError|vbBoolean|vbVariant)\b/gi, output : '<i>$1</i>' },
5254
{ input : /\b(vbDataObject|vbDecimal|vbByte|vbArray)\b/gi, output : '<i>$1</i>' },
5355
// html comments
54-
{ input : /(&lt;!--.*?--&gt.)/g, output : '<big>$1</big>' }
56+
{ input : /(&lt;!--.*?--&gt.)/g, output : '<big>$1</big>' }
5557
]
5658

57-
Language.Functions = [
59+
Language.Functions = [
5860
// Output at index 0, must be the desired tagname surrounding a $1
5961
// Name is the index from the regex that marks the functionname
6062
{input : /(function|sub)([ ]*?)(\w+)([ ]*?\()/gi , output : '<ins>$1</ins>', name : '$3'}
@@ -106,12 +108,12 @@ Language.complete = [
106108
{ input : '"', output : '"$0"' },
107109
{ input : '(', output : '\($0\)' },
108110
{ input : '[', output : '\[$0\]' },
109-
{ input : '{', output : '{\n\t$0\n}' }
111+
{ input : '{', output : '{\n\t$0\n}' }
110112
]
111113

112114
Language.shortcuts = [
113115
{ input : '[space]', output : '&nbsp;' },
114116
{ input : '[enter]', output : '<br />' } ,
115117
{ input : '[j]', output : 'testing' },
116118
{ input : '[7]', output : '&amp;' }
117-
]
119+
]

0 commit comments

Comments
 (0)