Skip to content
This repository has been archived by the owner on Jul 25, 2021. It is now read-only.

Commit

Permalink
implement "formatValue"
Browse files Browse the repository at this point in the history
  • Loading branch information
clarketm committed May 2, 2017
1 parent 37553fa commit a10075a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/stable/js/tableexport.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
ignoreCols = self.settings.ignoreCols instanceof Array ? self.settings.ignoreCols : [self.settings.ignoreCols],
ignoreCSS = self.settings.ignoreCSS instanceof Array ? self.settings.ignoreCSS.join(", ") : self.settings.ignoreCSS,
emptyCSS = self.settings.emptyCSS instanceof Array ? self.settings.emptyCSS.join(", ") : self.settings.emptyCSS,
formatValue = TableExport.prototype.formatValue.bind(this, self.settings.trimWhitespace),
getType = TableExport.prototype.getType,
bootstrapClass, bootstrapTheme, bootstrapSpacing;

if (self.settings.bootstrap) {
Expand Down Expand Up @@ -99,7 +101,7 @@
}
return new Array(total).concat($(val).text());
}
return val.textContent;
return formatValue(val.textContent);
});
}),
dataObject = TableExport.prototype.escapeHtml(
Expand Down Expand Up @@ -150,7 +152,7 @@
}
return new Array(total).concat($(val).text());
}
return val.textContent;
return formatValue(val.textContent);
});
}),
dataObject = TableExport.prototype.escapeHtml(
Expand Down Expand Up @@ -178,7 +180,7 @@
if (_hasClass(val, emptyCSS)) {
return " "
}
return val.textContent;
return formatValue(val.textContent);
}).join(colD);
}).join(rdel),
dataObject = TableExport.prototype.escapeHtml(
Expand Down Expand Up @@ -206,7 +208,7 @@
if (_hasClass(val, emptyCSS)) {
return " "
}
return '"' + val.textContent.replace(/"/g, '""') + '"';
return '"' + formatValue(val.textContent.replace(/"/g, '""')) + '"';
}).join(colD);
}).join(rdel),
dataObject = TableExport.prototype.escapeHtml(
Expand Down Expand Up @@ -234,7 +236,7 @@
if (_hasClass(val, emptyCSS)) {
return " "
}
return val.textContent;
return formatValue(val.textContent);
}).join(colD);
}).join(rdel),
dataObject = TableExport.prototype.escapeHtml(
Expand Down

0 comments on commit a10075a

Please sign in to comment.