@oclif/table
Advanced tools
Comparing version 0.1.6 to 0.1.7
@@ -62,3 +62,3 @@ /* eslint-disable react/prop-types */ | ||
} | ||
function doStuffWithText({ horizontalAlignment, overflow, padding, value, width, }) { | ||
function formatTextWithMargins({ horizontalAlignment, overflow, padding, value, width, }) { | ||
function calculateMargins(spaces) { | ||
@@ -95,3 +95,3 @@ let marginLeft; | ||
const wrappedText = wrapAnsi(valueWithNoZeroWidthChars, spaceForText, { hard: true, trim: true, wordWrap: true }); | ||
const { marginLeft, marginRight } = calculateMargins(width - determineWidthOfWrappedText(wrappedText)); | ||
const { marginLeft, marginRight } = calculateMargins(width - determineWidthOfWrappedText(stripAnsi(wrappedText))); | ||
const text = wrappedText.replaceAll('\n', `${' '.repeat(marginRight)}\n${' '.repeat(marginLeft)}`); | ||
@@ -220,3 +220,3 @@ return { | ||
const key = `${props.key}-cell-${column.key}`; | ||
const { marginLeft, marginRight, text } = doStuffWithText({ | ||
const { marginLeft, marginRight, text } = formatTextWithMargins({ | ||
horizontalAlignment, | ||
@@ -223,0 +223,0 @@ overflow, |
{ | ||
"name": "@oclif/table", | ||
"description": "Display table in terminal", | ||
"version": "0.1.6", | ||
"version": "0.1.7", | ||
"author": "Salesforce", | ||
@@ -6,0 +6,0 @@ "bugs": "https://github.com/oclif/multi-stage-output/issues", |
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
39604