From ec879e3db4d36212ee200d19e1f7e92f9f4d83c9 Mon Sep 17 00:00:00 2001 From: ayvis Date: Wed, 19 Mar 2014 22:12:40 +0100 Subject: replaced BR with br replaced uppercase html tags with lowaercase --- usr/local/www/code-syntax-highlighter/shCore.js | 8 ++++---- usr/local/www/code-syntax-highlighter/shCore.uncompressed.js | 8 ++++---- usr/local/www/javascript/scriptaculous/builder.js | 12 ++++++------ 3 files changed, 14 insertions(+), 14 deletions(-) (limited to 'usr/local') diff --git a/usr/local/www/code-syntax-highlighter/shCore.js b/usr/local/www/code-syntax-highlighter/shCore.js index d21af72..7193620 100644 --- a/usr/local/www/code-syntax-highlighter/shCore.js +++ b/usr/local/www/code-syntax-highlighter/shCore.js @@ -220,16 +220,16 @@ dp.sh.Highlighter.prototype.AddBit = function(str, css) for(var i = 0; i < lines.length; i++) { - span = document.createElement('SPAN'); + span = document.createElement('span'); span.className = css; span.innerHTML = lines[i]; this.div.appendChild(span); - // don't add a
for the last line + // don't add a
for the last line if(i + 1 < lines.length) { - this.div.appendChild(document.createElement('BR')); + this.div.appendChild(document.createElement('br')); } } } @@ -340,7 +340,7 @@ dp.sh.Highlighter.prototype.ProcessSmartTabs = function(code) dp.sh.Highlighter.prototype.SwitchToTable = function() { // Safari fix: for some reason lowercase
isn't getting picked up, even though 'i' is set - var lines = this.div.innerHTML.split(/
/gi); + var lines = this.div.innerHTML.split(/
/gi); var row = null; var cell = null; var html = ''; diff --git a/usr/local/www/code-syntax-highlighter/shCore.uncompressed.js b/usr/local/www/code-syntax-highlighter/shCore.uncompressed.js index 9544a8e..0903a07 100644 --- a/usr/local/www/code-syntax-highlighter/shCore.uncompressed.js +++ b/usr/local/www/code-syntax-highlighter/shCore.uncompressed.js @@ -236,7 +236,7 @@ dp.sh.Highlighter.prototype.AddBit = function(str, css) if(str == null || str.length == 0) return; - var span = this.CreateElement('SPAN'); + var span = this.CreateElement('span'); str = str.replace(/&/g, '&'); str = str.replace(/ /g, ' '); @@ -257,15 +257,15 @@ dp.sh.Highlighter.prototype.AddBit = function(str, css) for(var i = 0; i < lines.length; i++) { - span = this.CreateElement('SPAN'); + span = this.CreateElement('span'); span.className = css; span.innerHTML = lines[i]; this.div.appendChild(span); - // don't add a
for the last line + // don't add a
for the last line if(i + 1 < lines.length) - this.div.appendChild(this.CreateElement('BR')); + this.div.appendChild(this.CreateElement('br')); } } else diff --git a/usr/local/www/javascript/scriptaculous/builder.js b/usr/local/www/javascript/scriptaculous/builder.js index f1f42b9..b0dd14e 100644 --- a/usr/local/www/javascript/scriptaculous/builder.js +++ b/usr/local/www/javascript/scriptaculous/builder.js @@ -120,12 +120,12 @@ var Builder = { dump: function(scope) { if(typeof scope != 'object' && typeof scope != 'function') scope = window; //global scope - var tags = ("A ABBR ACRONYM ADDRESS APPLET AREA B BASE BASEFONT BDO BIG BLOCKQUOTE BODY " + - "BR BUTTON CAPTION CENTER CITE CODE COL COLGROUP DD DEL DFN DIR DIV DL DT EM FIELDSET " + - "FONT FORM FRAME FRAMESET H1 H2 H3 H4 H5 H6 HEAD HR HTML I IFRAME IMG INPUT INS ISINDEX "+ - "KBD LABEL LEGEND LI LINK MAP MENU META NOFRAMES NOSCRIPT OBJECT OL OPTGROUP OPTION P "+ - "PARAM PRE Q S SAMP SCRIPT SELECT SMALL SPAN STRIKE STRONG STYLE SUB SUP TABLE TBODY TD "+ - "TEXTAREA TFOOT TH THEAD TITLE TR TT U UL VAR").split(/\s+/); + var tags = ("a abbr acronym address applet area b base basefont bdo big blockquote body " + + "br button caption center cite code col colgroup dd del dfn dir div dl dt em fieldset " + + "font form frame frameset h1 h2 h3 h4 h5 h6 head hr html i iframe img input ins isindex "+ + "kbd label legend li link map menu meta noframes noscript object ol optgroup option p "+ + "param pre q s samp script select small span strike strong style sub sup table tbody td "+ + "textarea tfoot th thead title tr tt u ul var").split(/\s+/); tags.each( function(tag){ scope[tag] = function() { -- cgit v1.1