Some bugfixes on my Syntax Higlighting Quine. Also killed a few bytes but added a lengthy comment in turn.
// JavaScript Syntax Highlighting & Quine
b=document.body
e=b.children
c=e[1].text
b.innerHTML='<textarea rows=10 cols=80></textarea><br><button onclick=h()>Highlight</button><pre/>'
e[0].value=c
x=[
/&/g,'&',
/</g,'<',
/>/g,'>',
/\\./g,function(m){return 'r'+p.push(m)+'>'},
/([\[({=:+,]\s*)\/(?![\/\*])/g,'$1<h/',
/(\/\*[\s|\S]*?\*\/|\/\/.*)|(<h\/.+?\/\w*)|".*?"|'.*?'/g,function(m,c,x){return 'r'+p.push(s(c?'666':x?'6a0':'719',m))+'>'},
/((&\w+;|[-\/+*=?:.,;()\[\]{}|%^!])+)/g,s('17b'),
/\b(break|case|catch|continue|default|delete|do|else|false|finally|for|function|if|in|instanceof|new|return|switch|this|throw|true|try|typeof|var|void|while|with)\b/gi,s('f0b'),
/\b(0x[\da-f]+|\d+)\b/g,s('d83'),
/r(\d+)>/g,function(m,n){return p[n-1].replace(x[18],x[19])},
/<h/g,''
]
function s(c,r){
return '<span style=color:#'+c+'>'+(r||'$1')+'</span>'
}
function h(){
p=[]
v=e[0].value
for(i=0;i<22;)
v=v.replace(x[i++],x[i++])
e[3].innerHTML=v
}
h()
DQovLyBKYXZhU2NyaXB0IFN5bnRheCBIaWdobGlnaHRpbmcgJiBRdWluZQ0KYj1kb2N1bWVudC5ib2R5DQplPWIuY2hpbGRyZW4NCmM9ZVsxXS50ZXh0DQpiLmlubmVySFRNTD0nPHRleHRhcmVhIHJvd3M9MTAgY29scz04MD48L3RleHRhcmVhPjxicj48YnV0dG9uIG9uY2xpY2s9aCgpPkhpZ2hsaWdodDwvYnV0dG9uPjxwcmUvPicNCmVbMF0udmFsdWU9Yw0KeD1bDQoJLyYvZywnJmFtcDsnLA0KCS88L2csJyZsdDsnLA0KCS8+L2csJyZndDsnLA0KCS9cXC4vZyxmdW5jdGlvbihtKXtyZXR1cm4gJ3InK3AucHVzaChtKSsnPid9LA0K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