Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added check for undefined column number in results.

Changed span to strong in error highlighting.
Some minor CSS adjustments.
  • Loading branch information...
commit 5b7801e24dc5939bebe10052bf02533ff9d4ac1b 1 parent f15b6c0
@rogerjohansson authored
View
3  README.md
@@ -14,4 +14,5 @@ CHANGELOG
* 1.4.5 - 2011-02-22 - NEW: option to validate pages only when triggered manually
* 1.5.0 - 2011-02-23 - NEW: the results page shown when clicking the statusbar icon is generated from the original, cached, validator response
* 1.5.1 - 2011-02-23 - FIX: Changed how results are accessed
-* 1.5.2 - 2011-02-23 - FIX: higlighted code in results tab
+* 1.5.2 - 2011-02-23 - FIX: higlighted code in results tab
+* 1.5.3 - 2011-02-24 - FIX: Changed element used for code highlighting, added check for undefined column numbers
View
4 chrome/content/html5validator.js
@@ -442,7 +442,7 @@ var html5validator = function()
li.className = message['type'] + (message['subType'] ? ' ' + message['subType'] : '');
li.innerHTML = '<p><strong class="type">' + (message['subType'] ? ' ' + message['subType'] : message['type']) + ':</strong> ' + encodeHTML(message['message']) + '</p>';
if (message['lastLine']) {
- li.innerHTML += '<p class="location">At line <span class="last-line">' + message['lastLine'] + '</span>, column <span class="first-col">' + message['firstColumn'] + '</span></p>';
+ li.innerHTML += '<p class="location">At line <span class="last-line">' + message['lastLine'] + '</span>' + (message['firstColumn'] ? ', column <span class="first-col">' + message['firstColumn'] : '') + '</span></p>';
}
if (message['extract']) {
ext = message['extract'];
@@ -451,7 +451,7 @@ var html5validator = function()
st = message['hiliteStart'];
len = message['hiliteLength'];
ext = ext.substr(0, st) + '~^~' + ext.substr(st, len) + '~$~' + ext.substr(st + len);
- ext = encodeHTML(ext).replace('~^~', '<span class="highlight">').replace('~$~', '</span>');
+ ext = encodeHTML(ext).replace('~^~', '<strong class="highlight">').replace('~$~', '</strong>');
}
else
ext = encodeHTML(ext);
View
2  install.rdf
@@ -4,7 +4,7 @@
<Description about="urn:mozilla:install-manifest">
<em:id>html5validator@456bereastreet.com</em:id>
<em:name>HTML5 Validator</em:name>
- <em:version>1.5.2</em:version>
+ <em:version>1.5.3</em:version>
<em:type>2</em:type>
<em:creator>Roger Johansson</em:creator>
<em:contributor>Valentin Agachi</em:contributor>
View
14 skin/results.css
@@ -9,11 +9,11 @@ body {
color:#222;
background:#fff;
}
-h1 {font-size:1.5em;margin:0 0 .2em;}
+h1 {font-size:1.5em;margin:0 0 0.2em;}
h2 {font-size:1.2em;margin:0 0 1em;}
li {
- padding:.5em;
- margin:0 0 .2em;
+ padding:0.5em;
+ margin:0 0 0.2em;
}
p, pre {margin:0;}
pre {white-space:pre-wrap;}
@@ -21,5 +21,9 @@ pre {white-space:pre-wrap;}
.warning {background:#ffc;}
.error {background:#fcc;}
.type {text-transform:capitalize;}
-.last-line, .first-col {font:bold 1.1em monospace;background:rgba(255,255,255,.25);}
-.highlight {background:rgba(255,255,255,.6);}
+.last-line,
+.first-col {
+ background:rgba(255,255,255,0.25);
+ font:bold 1.1em monospace;
+}
+.highlight {background:rgba(255,255,255,0.6);}
Please sign in to comment.
Something went wrong with that request. Please try again.