Skip to content

Commit e9fae9a

Browse files
amroamroamromikesamuel
authored andcommitted
element nodeName is case sensitive (fix googlearchive#309)
this fixes a failing test in numberLines_test.html
1 parent 61f16eb commit e9fae9a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js-modules/numberLines.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function numberLines(node, startLineNum, isPreformatted) {
3030
function walk(node) {
3131
var type = node.nodeType;
3232
if (type == 1 && !nocode.test(node.className)) { // Element
33-
if ('br' === node.nodeName) {
33+
if ('br' === node.nodeName.toLowerCase()) {
3434
breakAfter(node);
3535
// Discard the <BR> since it is now flush against a </LI>.
3636
if (node.parentNode) {

0 commit comments

Comments
 (0)