summaryrefslogtreecommitdiff
path: root/tools/node_modules/eslint/node_modules/table/dist/calculateCellWidthIndex.js.flow
diff options
context:
space:
mode:
Diffstat (limited to 'tools/node_modules/eslint/node_modules/table/dist/calculateCellWidthIndex.js.flow')
-rw-r--r--tools/node_modules/eslint/node_modules/table/dist/calculateCellWidthIndex.js.flow6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/node_modules/eslint/node_modules/table/dist/calculateCellWidthIndex.js.flow b/tools/node_modules/eslint/node_modules/table/dist/calculateCellWidthIndex.js.flow
index f6b90dd8c0..6e4f7a5971 100644
--- a/tools/node_modules/eslint/node_modules/table/dist/calculateCellWidthIndex.js.flow
+++ b/tools/node_modules/eslint/node_modules/table/dist/calculateCellWidthIndex.js.flow
@@ -8,6 +8,10 @@ import stringWidth from 'string-width';
*/
export default (cells) => {
return cells.map((value) => {
- return stringWidth(value);
+ return Math.max(
+ ...value.split('\n').map((line) => {
+ return stringWidth(line);
+ })
+ );
});
};