~ubuntu-branches/ubuntu/utopic/python-chaco/utopic

« back to all changes in this revision

Viewing changes to docs/scipy_tutorial/Scripts/shCore.uncompressed.js

  • Committer: Package Import Robot
  • Author(s): Andrew Starr-Bochicchio
  • Date: 2014-06-01 17:04:08 UTC
  • mfrom: (7.2.5 sid)
  • Revision ID: package-import@ubuntu.com-20140601170408-m86xvdjd83a4qon0
Tags: 4.4.1-1ubuntu1
* Merge from Debian unstable. Remaining Ubuntu changes:
 - Let the binary-predeb target work on the usr/lib/python* directory
   as we don't have usr/share/pyshared anymore.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/**
2
 
 * Code Syntax Highlighter.
3
 
 * Version 1.3.0
4
 
 * Copyright (C) 2004 Alex Gorbatchev.
5
 
 * http://www.dreamprojections.com/syntaxhighlighter/
6
 
 * 
7
 
 * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General 
8
 
 * Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) 
9
 
 * any later version.
10
 
 *
11
 
 * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied 
12
 
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 
13
 
 * details.
14
 
 *
15
 
 * You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to 
16
 
 * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
17
 
 */
18
 
 
19
 
//
20
 
// create namespaces
21
 
//
22
 
var dp = {
23
 
        sh :
24
 
        {
25
 
                Toolbar : {},
26
 
                Utils   : {},
27
 
                RegexLib: {},
28
 
                Brushes : {},
29
 
                Strings : {},
30
 
                Version : '1.4.0'
31
 
        }
32
 
};
33
 
 
34
 
dp.sh.Strings = {
35
 
        AboutDialog : '<html><head><title>About...</title></head><body class="dp-about"><table cellspacing="0"><tr><td class="copy"><p class="title">dp.SyntaxHighlighter</div><div class="para">Version: {V}</p><p><a href="http://www.dreamprojections.com/syntaxhighlighter/?ref=about" target="_blank">http://www.dreamprojections.com/SyntaxHighlighter</a></p>&copy;2004-2005 Alex Gorbatchev. All right reserved.</td></tr><tr><td class="footer"><input type="button" class="close" value="OK" onClick="window.close()"/></td></tr></table></body></html>'
36
 
};
37
 
 
38
 
dp.SyntaxHighlighter = dp.sh;
39
 
 
40
 
//
41
 
// Toolbar functions
42
 
//
43
 
 
44
 
dp.sh.Toolbar.Commands = {
45
 
        ExpandSource: {
46
 
                label: '+ expand source',
47
 
                check: function(highlighter) { return highlighter.collapse; },
48
 
                func: function(sender, highlighter)
49
 
                {
50
 
                        sender.parentNode.removeChild(sender);
51
 
                        highlighter.div.className = highlighter.div.className.replace('collapsed', '');
52
 
                }
53
 
        },
54
 
        
55
 
        // opens a new windows and puts the original unformatted source code inside.
56
 
        ViewSource: {
57
 
                label: 'view plain',
58
 
                func: function(sender, highlighter)
59
 
                {
60
 
                        var code = highlighter.originalCode.replace(/</g, '&lt;');
61
 
                        var wnd = window.open('', '_blank', 'width=750, height=400, location=0, resizable=1, menubar=0, scrollbars=1');
62
 
                        wnd.document.write('<textarea style="width:99%;height:99%">' + code + '</textarea>');
63
 
                        wnd.document.close();
64
 
                }
65
 
        },
66
 
        
67
 
        // copies the original source code in to the clipboard (IE only)
68
 
        CopyToClipboard: {
69
 
                label: 'copy to clipboard',
70
 
                check: function() { return window.clipboardData != null; },
71
 
                func: function(sender, highlighter)
72
 
                {
73
 
                        window.clipboardData.setData('text', highlighter.originalCode);
74
 
                        alert('The code is in your clipboard now');
75
 
                }
76
 
        },
77
 
        
78
 
        // creates an invisible iframe, puts the original source code inside and prints it
79
 
        PrintSource: {
80
 
                label: 'print',
81
 
                func: function(sender, highlighter)
82
 
                {
83
 
                        var iframe = document.createElement('IFRAME');
84
 
                        var doc = null;
85
 
 
86
 
                        // this hides the iframe
87
 
                        iframe.style.cssText = 'position:absolute;width:0px;height:0px;left:-500px;top:-500px;';
88
 
                        
89
 
                        document.body.appendChild(iframe);
90
 
                        doc = iframe.contentWindow.document;
91
 
 
92
 
                        dp.sh.Utils.CopyStyles(doc, window.document);
93
 
                        doc.write('<div class="' + highlighter.div.className.replace('collapsed', '') + ' printing">' + highlighter.div.innerHTML + '</div>');
94
 
                        doc.close();
95
 
 
96
 
                        iframe.contentWindow.focus();
97
 
                        iframe.contentWindow.print();
98
 
                        
99
 
                        alert('Printing...');
100
 
                        
101
 
                        document.body.removeChild(iframe);
102
 
                }
103
 
        },
104
 
        
105
 
        About: {
106
 
                label: '?',
107
 
                func: function(highlighter)
108
 
                {
109
 
                        var wnd = window.open('', '_blank', 'dialog,width=300,height=150,scrollbars=0');
110
 
                        var doc = wnd.document;
111
 
 
112
 
                        dp.sh.Utils.CopyStyles(doc, window.document);
113
 
                        
114
 
                        doc.write(dp.sh.Strings.AboutDialog.replace('{V}', dp.sh.Version));
115
 
                        doc.close();
116
 
                        wnd.focus();
117
 
                }
118
 
        }
119
 
};
120
 
 
121
 
// creates a <div /> with all toolbar links
122
 
dp.sh.Toolbar.Create = function(highlighter)
123
 
{
124
 
        var div = document.createElement('DIV');
125
 
        
126
 
        div.className = 'tools';
127
 
        
128
 
        for(var name in dp.sh.Toolbar.Commands)
129
 
        {
130
 
                var cmd = dp.sh.Toolbar.Commands[name];
131
 
                
132
 
                if(cmd.check != null && !cmd.check(highlighter))
133
 
                        continue;
134
 
                
135
 
                div.innerHTML += '<a href="#" onclick="dp.sh.Toolbar.Command(\'' + name + '\',this);return false;">' + cmd.label + '</a>';
136
 
        }
137
 
        
138
 
        return div;
139
 
}
140
 
 
141
 
// executes toolbar command by name
142
 
dp.sh.Toolbar.Command = function(name, sender)
143
 
{
144
 
        var n = sender;
145
 
        
146
 
        while(n != null && n.className.indexOf('dp-highlighter') == -1)
147
 
                n = n.parentNode;
148
 
        
149
 
        if(n != null)
150
 
                dp.sh.Toolbar.Commands[name].func(sender, n.highlighter);
151
 
}
152
 
 
153
 
// copies all <link rel="stylesheet" /> from 'target' window to 'dest'
154
 
dp.sh.Utils.CopyStyles = function(destDoc, sourceDoc)
155
 
{
156
 
        var links = sourceDoc.getElementsByTagName('link');
157
 
 
158
 
        for(var i = 0; i < links.length; i++)
159
 
                if(links[i].rel.toLowerCase() == 'stylesheet')
160
 
                        destDoc.write('<link type="text/css" rel="stylesheet" href="' + links[i].href + '"></link>');
161
 
}
162
 
 
163
 
//
164
 
// Common reusable regular expressions
165
 
//
166
 
dp.sh.RegexLib = {
167
 
        MultiLineCComments : new RegExp('/\\*[\\s\\S]*?\\*/', 'gm'),
168
 
        SingleLineCComments : new RegExp('//.*$', 'gm'),
169
 
        SingleLinePerlComments : new RegExp('#.*$', 'gm'),
170
 
        DoubleQuotedString : new RegExp('"(?:\\.|(\\\\\\")|[^\\""])*"','g'),
171
 
        SingleQuotedString : new RegExp("'(?:\\.|(\\\\\\')|[^\\''])*'", 'g')
172
 
};
173
 
 
174
 
//
175
 
// Match object
176
 
//
177
 
dp.sh.Match = function(value, index, css)
178
 
{
179
 
        this.value = value;
180
 
        this.index = index;
181
 
        this.length = value.length;
182
 
        this.css = css;
183
 
}
184
 
 
185
 
//
186
 
// Highlighter object
187
 
//
188
 
dp.sh.Highlighter = function()
189
 
{
190
 
        this.addGutter = true;
191
 
        this.addControls = true;
192
 
        this.collapse = false;
193
 
        this.tabsToSpaces = true;
194
 
        this.wrapColumn = 80;
195
 
        this.showColumns = true;
196
 
}
197
 
 
198
 
// static callback for the match sorting
199
 
dp.sh.Highlighter.SortCallback = function(m1, m2)
200
 
{
201
 
        // sort matches by index first
202
 
        if(m1.index < m2.index)
203
 
                return -1;
204
 
        else if(m1.index > m2.index)
205
 
                return 1;
206
 
        else
207
 
        {
208
 
                // if index is the same, sort by length
209
 
                if(m1.length < m2.length)
210
 
                        return -1;
211
 
                else if(m1.length > m2.length)
212
 
                        return 1;
213
 
        }
214
 
        return 0;
215
 
}
216
 
 
217
 
dp.sh.Highlighter.prototype.CreateElement = function(name)
218
 
{
219
 
        var result = document.createElement(name);
220
 
        result.highlighter = this;
221
 
        return result;
222
 
}
223
 
 
224
 
// gets a list of all matches for a given regular expression
225
 
dp.sh.Highlighter.prototype.GetMatches = function(regex, css)
226
 
{
227
 
        var index = 0;
228
 
        var match = null;
229
 
 
230
 
        while((match = regex.exec(this.code)) != null)
231
 
                this.matches[this.matches.length] = new dp.sh.Match(match[0], match.index, css);
232
 
}
233
 
 
234
 
dp.sh.Highlighter.prototype.AddBit = function(str, css)
235
 
{
236
 
        if(str == null || str.length == 0)
237
 
                return;
238
 
 
239
 
        var span = this.CreateElement('SPAN');
240
 
        
241
 
        str = str.replace(/&/g, '&amp;');
242
 
        str = str.replace(/ /g, '&nbsp;');
243
 
        str = str.replace(/</g, '&lt;');
244
 
        str = str.replace(/\n/gm, '&nbsp;<br>');
245
 
 
246
 
        // when adding a piece of code, check to see if it has line breaks in it 
247
 
        // and if it does, wrap individual line breaks with span tags
248
 
        if(css != null)
249
 
        {
250
 
                var regex = new RegExp('<br>', 'gi');
251
 
                
252
 
                if(regex.test(str))
253
 
                {
254
 
                        var lines = str.split('&nbsp;<br>');
255
 
                        
256
 
                        str = '';
257
 
                        
258
 
                        for(var i = 0; i < lines.length; i++)
259
 
                        {
260
 
                                span = this.CreateElement('SPAN');
261
 
                                span.className = css;
262
 
                                span.innerHTML = lines[i];
263
 
                                
264
 
                                this.div.appendChild(span);
265
 
                                
266
 
                                // don't add a <BR> for the last line
267
 
                                if(i + 1 < lines.length)
268
 
                                        this.div.appendChild(this.CreateElement('BR'));
269
 
                        }
270
 
                }
271
 
                else
272
 
                {
273
 
                        span.className = css;
274
 
                        span.innerHTML = str;
275
 
                        this.div.appendChild(span);
276
 
                }
277
 
        }
278
 
        else
279
 
        {
280
 
                span.innerHTML = str;
281
 
                this.div.appendChild(span);
282
 
        }
283
 
}
284
 
 
285
 
// checks if one match is inside any other match
286
 
dp.sh.Highlighter.prototype.IsInside = function(match)
287
 
{
288
 
        if(match == null || match.length == 0)
289
 
                return false;
290
 
        
291
 
        for(var i = 0; i < this.matches.length; i++)
292
 
        {
293
 
                var c = this.matches[i];
294
 
                
295
 
                if(c == null)
296
 
                        continue;
297
 
 
298
 
                if((match.index > c.index) && (match.index < c.index + c.length))
299
 
                        return true;
300
 
        }
301
 
        
302
 
        return false;
303
 
}
304
 
 
305
 
dp.sh.Highlighter.prototype.ProcessRegexList = function()
306
 
{
307
 
        for(var i = 0; i < this.regexList.length; i++)
308
 
                this.GetMatches(this.regexList[i].regex, this.regexList[i].css);
309
 
}
310
 
 
311
 
dp.sh.Highlighter.prototype.ProcessSmartTabs = function(code)
312
 
{
313
 
        var lines       = code.split('\n');
314
 
        var result      = '';
315
 
        var tabSize     = 4;
316
 
        var tab         = '\t';
317
 
 
318
 
        // This function inserts specified amount of spaces in the string
319
 
        // where a tab is while removing that given tab. 
320
 
        function InsertSpaces(line, pos, count)
321
 
        {
322
 
                var left        = line.substr(0, pos);
323
 
                var right       = line.substr(pos + 1, line.length);    // pos + 1 will get rid of the tab
324
 
                var spaces      = '';
325
 
                
326
 
                for(var i = 0; i < count; i++)
327
 
                        spaces += ' ';
328
 
                
329
 
                return left + spaces + right;
330
 
        }
331
 
 
332
 
        // This function process one line for 'smart tabs'
333
 
        function ProcessLine(line, tabSize)
334
 
        {
335
 
                if(line.indexOf(tab) == -1)
336
 
                        return line;
337
 
 
338
 
                var pos = 0;
339
 
 
340
 
                while((pos = line.indexOf(tab)) != -1)
341
 
                {
342
 
                        // This is pretty much all there is to the 'smart tabs' logic.
343
 
                        // Based on the position within the line and size of a tab, 
344
 
                        // calculate the amount of spaces we need to insert.
345
 
                        var spaces = tabSize - pos % tabSize;
346
 
                        
347
 
                        line = InsertSpaces(line, pos, spaces);
348
 
                }
349
 
                
350
 
                return line;
351
 
        }
352
 
 
353
 
        // Go through all the lines and do the 'smart tabs' magic.
354
 
        for(var i = 0; i < lines.length; i++)
355
 
                result += ProcessLine(lines[i], tabSize) + '\n';
356
 
        
357
 
        return result;
358
 
}
359
 
 
360
 
dp.sh.Highlighter.prototype.SwitchToList = function()
361
 
{
362
 
        // thanks to Lachlan Donald from SitePoint.com for this <br/> tag fix.
363
 
        var html = this.div.innerHTML.replace(/<(br)\/?>/gi, '\n');
364
 
        var lines = html.split('\n');
365
 
        
366
 
        if(this.addControls == true)
367
 
                this.bar.appendChild(dp.sh.Toolbar.Create(this));
368
 
 
369
 
        // add columns ruler
370
 
        if(this.showColumns)
371
 
        {
372
 
                var div = this.CreateElement('div');
373
 
                var columns = this.CreateElement('div');
374
 
                var showEvery = 10;
375
 
                var i = 1;
376
 
                
377
 
                while(i <= 150)
378
 
                {
379
 
                        if(i % showEvery == 0)
380
 
                        {
381
 
                                div.innerHTML += i;
382
 
                                i += (i + '').length;
383
 
                        }
384
 
                        else
385
 
                        {
386
 
                                div.innerHTML += '&middot;';
387
 
                                i++;
388
 
                        }
389
 
                }
390
 
                
391
 
                columns.className = 'columns';
392
 
                columns.appendChild(div);
393
 
                this.bar.appendChild(columns);
394
 
        }
395
 
 
396
 
        for(var i = 0, lineIndex = this.firstLine; i < lines.length - 1; i++, lineIndex++)
397
 
        {
398
 
                var li = this.CreateElement('LI');
399
 
                var span = this.CreateElement('SPAN');
400
 
                
401
 
                // uses .line1 and .line2 css styles for alternating lines
402
 
                li.className = (i % 2 == 0) ? 'alt' : '';
403
 
                span.innerHTML = lines[i] + '&nbsp;';
404
 
 
405
 
                li.appendChild(span);
406
 
                this.ol.appendChild(li);
407
 
        }
408
 
        
409
 
        this.div.innerHTML      = '';
410
 
}
411
 
 
412
 
dp.sh.Highlighter.prototype.Highlight = function(code)
413
 
{
414
 
        function Trim(str)
415
 
        {
416
 
                return str.replace(/^\s*(.*?)[\s\n]*$/g, '$1');
417
 
        }
418
 
        
419
 
        function Chop(str)
420
 
        {
421
 
                return str.replace(/\n*$/, '').replace(/^\n*/, '');
422
 
        }
423
 
 
424
 
        function Unindent(str)
425
 
        {
426
 
                var lines = str.split('\n');
427
 
                var indents = new Array();
428
 
                var regex = new RegExp('^\\s*', 'g');
429
 
                var min = 1000;
430
 
 
431
 
                // go through every line and check for common number of indents
432
 
                for(var i = 0; i < lines.length && min > 0; i++)
433
 
                {
434
 
                        if(Trim(lines[i]).length == 0)
435
 
                                continue;
436
 
                                
437
 
                        var matches = regex.exec(lines[i]);
438
 
 
439
 
                        if(matches != null && matches.length > 0)
440
 
                                min = Math.min(matches[0].length, min);
441
 
                }
442
 
 
443
 
                // trim minimum common number of white space from the begining of every line
444
 
                if(min > 0)
445
 
                        for(var i = 0; i < lines.length; i++)
446
 
                                lines[i] = lines[i].substr(min);
447
 
 
448
 
                return lines.join('\n');
449
 
        }
450
 
        
451
 
        // This function returns a portions of the string from pos1 to pos2 inclusive
452
 
        function Copy(string, pos1, pos2)
453
 
        {
454
 
                return string.substr(pos1, pos2 - pos1);
455
 
        }
456
 
 
457
 
        var pos = 0;
458
 
        
459
 
        this.originalCode = code;
460
 
        this.code = Chop(Unindent(code));
461
 
        this.div = this.CreateElement('DIV');
462
 
        this.bar = this.CreateElement('DIV');
463
 
        this.ol = this.CreateElement('OL');
464
 
        this.matches = new Array();
465
 
 
466
 
        this.div.className = 'dp-highlighter';
467
 
        this.div.highlighter = this;
468
 
        
469
 
        this.bar.className = 'bar';
470
 
        
471
 
        // set the first line
472
 
        this.ol.start = this.firstLine;
473
 
 
474
 
        if(this.CssClass != null)
475
 
                this.ol.className = this.CssClass;
476
 
 
477
 
        if(this.collapse)
478
 
                this.div.className += ' collapsed';
479
 
 
480
 
        // replace tabs with spaces
481
 
        if(this.tabsToSpaces == true)
482
 
                this.code = this.ProcessSmartTabs(this.code);
483
 
 
484
 
        this.ProcessRegexList();        
485
 
 
486
 
        // if no matches found, add entire code as plain text
487
 
        if(this.matches.length == 0)
488
 
        {
489
 
                this.AddBit(this.code, null);
490
 
                this.SwitchToList();
491
 
                this.div.appendChild(this.ol);
492
 
                return;
493
 
        }
494
 
 
495
 
        // sort the matches
496
 
        this.matches = this.matches.sort(dp.sh.Highlighter.SortCallback);
497
 
 
498
 
        // The following loop checks to see if any of the matches are inside
499
 
        // of other matches. This process would get rid of highligted strings
500
 
        // inside comments, keywords inside strings and so on.
501
 
        for(var i = 0; i < this.matches.length; i++)
502
 
                if(this.IsInside(this.matches[i]))
503
 
                        this.matches[i] = null;
504
 
 
505
 
        // Finally, go through the final list of matches and pull the all
506
 
        // together adding everything in between that isn't a match.
507
 
        for(var i = 0; i < this.matches.length; i++)
508
 
        {
509
 
                var match = this.matches[i];
510
 
 
511
 
                if(match == null || match.length == 0)
512
 
                        continue;
513
 
 
514
 
                this.AddBit(Copy(this.code, pos, match.index), null);
515
 
                this.AddBit(match.value, match.css);
516
 
 
517
 
                pos = match.index + match.length;
518
 
        }
519
 
        
520
 
        this.AddBit(this.code.substr(pos), null);
521
 
 
522
 
        this.SwitchToList();
523
 
        this.div.appendChild(this.bar);
524
 
        this.div.appendChild(this.ol);
525
 
}
526
 
 
527
 
dp.sh.Highlighter.prototype.GetKeywords = function(str) 
528
 
{
529
 
        return '\\b' + str.replace(/ /g, '\\b|\\b') + '\\b';
530
 
}
531
 
 
532
 
// highlightes all elements identified by name and gets source code from specified property
533
 
dp.sh.HighlightAll = function(name, showGutter /* optional */, showControls /* optional */, collapseAll /* optional */, firstLine /* optional */, showColumns /* optional */)
534
 
{
535
 
        function FindValue()
536
 
        {
537
 
                var a = arguments;
538
 
                
539
 
                for(var i = 0; i < a.length; i++)
540
 
                {
541
 
                        if(a[i] == null)
542
 
                                continue;
543
 
                                
544
 
                        if(typeof(a[i]) == 'string' && a[i] != '')
545
 
                                return a[i] + '';
546
 
                
547
 
                        if(typeof(a[i]) == 'object' && a[i].value != '')
548
 
                                return a[i].value + '';
549
 
                }
550
 
                
551
 
                return null;
552
 
        }
553
 
        
554
 
        function IsOptionSet(value, list)
555
 
        {
556
 
                for(var i = 0; i < list.length; i++)
557
 
                        if(list[i] == value)
558
 
                                return true;
559
 
                
560
 
                return false;
561
 
        }
562
 
        
563
 
        function GetOptionValue(name, list, defaultValue)
564
 
        {
565
 
                var regex = new RegExp('^' + name + '\\[(\\w+)\\]$', 'gi');
566
 
                var matches = null;
567
 
 
568
 
                for(var i = 0; i < list.length; i++)
569
 
                        if((matches = regex.exec(list[i])) != null)
570
 
                                return matches[1];
571
 
                
572
 
                return defaultValue;
573
 
        }
574
 
 
575
 
        var elements = document.getElementsByName(name);
576
 
        var highlighter = null;
577
 
        var registered = new Object();
578
 
        var propertyName = 'value';
579
 
        
580
 
        // if no code blocks found, leave
581
 
        if(elements == null)
582
 
                return;
583
 
 
584
 
        // register all brushes
585
 
        for(var brush in dp.sh.Brushes)
586
 
        {
587
 
                var aliases = dp.sh.Brushes[brush].Aliases;
588
 
 
589
 
                if(aliases == null)
590
 
                        continue;
591
 
                
592
 
                for(var i = 0; i < aliases.length; i++)
593
 
                        registered[aliases[i]] = brush;
594
 
        }
595
 
 
596
 
        for(var i = 0; i < elements.length; i++)
597
 
        {
598
 
                var element = elements[i];
599
 
                var options = FindValue(
600
 
                                element.attributes['class'], element.className, 
601
 
                                element.attributes['language'], element.language
602
 
                                );
603
 
                var language = '';
604
 
                
605
 
                if(options == null)
606
 
                        continue;
607
 
                
608
 
                options = options.split(':');
609
 
                
610
 
                language = options[0].toLowerCase();
611
 
 
612
 
                if(registered[language] == null)
613
 
                        continue;
614
 
                
615
 
                // instantiate a brush
616
 
                highlighter = new dp.sh.Brushes[registered[language]]();
617
 
                
618
 
                // hide the original element
619
 
                element.style.display = 'none';
620
 
 
621
 
                highlighter.addGutter = (showGutter == null) ? !IsOptionSet('nogutter', options) : showGutter;
622
 
                highlighter.addControls = (showControls == null) ? !IsOptionSet('nocontrols', options) : showControls;
623
 
                highlighter.collapse = (collapseAll == null) ? IsOptionSet('collapse', options) : collapseAll;
624
 
                highlighter.showColumns = (showColumns == null) ? IsOptionSet('showcolumns', options) : showColumns;
625
 
                
626
 
                // first line idea comes from Andrew Collington, thanks!
627
 
                highlighter.firstLine = (firstLine == null) ? parseInt(GetOptionValue('firstline', options, 1)) : firstLine;
628
 
 
629
 
                highlighter.Highlight(element[propertyName]);
630
 
 
631
 
                element.parentNode.insertBefore(highlighter.div, element);
632
 
        }       
633
 
}