Skip to content

Commit 5f52f95

Browse files
committed
Uppercase tag support added
1 parent 37f5f1c commit 5f52f95

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/html-to-text.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ function walk(dom, options) {
7070
_.each(dom, function(elem) {
7171
switch(elem.type) {
7272
case 'tag':
73-
switch(elem.name) {
73+
switch(elem.name.toLowerCase()) {
7474
case 'a':
7575
result += format.anchor(elem, walk, options);
7676
break;
@@ -127,4 +127,4 @@ exports.fromFile = function(file, options, callback) {
127127

128128
exports.fromString = function(str, options) {
129129
return htmlToText(str, options || {});
130-
};
130+
};

0 commit comments

Comments
 (0)