html-to-text
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -13,12 +13,12 @@ var _ = require('underscore'); | ||
function formatImage(elem, options) { | ||
var result = ''; | ||
if (elem.attribs.alt) { | ||
result += elem.attribs.alt; | ||
var result = '', attribs = elem.attribs || {}; | ||
if (attribs.alt) { | ||
result += attribs.alt; | ||
if (attribs.src) { | ||
result += ' '; | ||
} | ||
} | ||
if (elem.attribs.alt && elem.attribs.src) { | ||
result += ' '; | ||
if (attribs.src) { | ||
result += '[' + attribs.src + ']'; | ||
} | ||
if (elem.attribs.src) { | ||
result += '[' + elem.attribs.src + ']'; | ||
} | ||
return (result); | ||
@@ -168,3 +168,3 @@ } | ||
row = _.map(row, function(col) { | ||
return col || ''; | ||
return col || ''; | ||
}); | ||
@@ -171,0 +171,0 @@ table.push(row); |
{ | ||
"name": "html-to-text", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Advanced html to plain text converter", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30738
11
406