react-markdown-table-ts 0.3.12 → 0.3.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +3 -3
- package/dist/index.esm.js +3 -3
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
@@ -4094,16 +4094,16 @@ function calculateColumnWidths(inputDataRows, maxColumnCount, minWidth, canRepla
|
|
4094
4094
|
var cellValue = currentRow[columnIndex];
|
4095
4095
|
var cellString = cellValue !== null && cellValue !== undefined ? String(cellValue) : '';
|
4096
4096
|
if (canReplaceNewlines) {
|
4097
|
-
// Replace newlines with <br
|
4097
|
+
// Replace newlines with <br>, which increases the length by 3 per newline.
|
4098
4098
|
var replacedString = cellString.replace(/\n/g, '<br>');
|
4099
4099
|
var adjustedLength = replacedString.length;
|
4100
|
-
// Update the column width if the adjusted length is greater
|
4100
|
+
// Update the column width if the adjusted length is greater.
|
4101
4101
|
if (adjustedLength > columnWidths[columnIndex]) {
|
4102
4102
|
columnWidths[columnIndex] = adjustedLength;
|
4103
4103
|
}
|
4104
4104
|
}
|
4105
4105
|
else {
|
4106
|
-
// Replace newlines with a space and calculate the length
|
4106
|
+
// Replace newlines with a space and calculate the length.
|
4107
4107
|
cellString = cellString.replace(/\n/g, ' ');
|
4108
4108
|
// Update the column width if the current cell's length is greater.
|
4109
4109
|
if (cellString.length > columnWidths[columnIndex]) {
|
package/dist/index.esm.js
CHANGED
@@ -4086,16 +4086,16 @@ function calculateColumnWidths(inputDataRows, maxColumnCount, minWidth, canRepla
|
|
4086
4086
|
var cellValue = currentRow[columnIndex];
|
4087
4087
|
var cellString = cellValue !== null && cellValue !== undefined ? String(cellValue) : '';
|
4088
4088
|
if (canReplaceNewlines) {
|
4089
|
-
// Replace newlines with <br
|
4089
|
+
// Replace newlines with <br>, which increases the length by 3 per newline.
|
4090
4090
|
var replacedString = cellString.replace(/\n/g, '<br>');
|
4091
4091
|
var adjustedLength = replacedString.length;
|
4092
|
-
// Update the column width if the adjusted length is greater
|
4092
|
+
// Update the column width if the adjusted length is greater.
|
4093
4093
|
if (adjustedLength > columnWidths[columnIndex]) {
|
4094
4094
|
columnWidths[columnIndex] = adjustedLength;
|
4095
4095
|
}
|
4096
4096
|
}
|
4097
4097
|
else {
|
4098
|
-
// Replace newlines with a space and calculate the length
|
4098
|
+
// Replace newlines with a space and calculate the length.
|
4099
4099
|
cellString = cellString.replace(/\n/g, ' ');
|
4100
4100
|
// Update the column width if the current cell's length is greater.
|
4101
4101
|
if (cellString.length > columnWidths[columnIndex]) {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "react-markdown-table-ts",
|
3
|
-
"version": "0.3.
|
3
|
+
"version": "0.3.14",
|
4
4
|
"description": "A React component that converts structured data into Markdown table syntax and displays it within a `<pre>` tag.",
|
5
5
|
"main": "dist/index.cjs.js",
|
6
6
|
"module": "dist/index.esm.js",
|