react-markdown-table-ts 0.6.2 → 0.6.3
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 +10 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +10 -3
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
@@ -4163,15 +4163,22 @@ function getColumnWidths(inputData, maxColumnCount, canAdjustColumnWidths) {
|
|
4163
4163
|
? calculateColumnWidths(__spreadArray([inputData.inputDataHeader], inputData.inputDataBody, true), maxColumnCount)
|
4164
4164
|
: undefined;
|
4165
4165
|
}
|
4166
|
-
function
|
4166
|
+
function formatHeaderAndAlignment(inputData, maxColumnCount, columnAlignments, columnWidths, useTabs, replaceNewlines, hasPadding) {
|
4167
4167
|
var headerRow = formatMarkdownRow(maxColumnCount, inputData.inputDataHeader, columnAlignments, columnWidths, useTabs, replaceNewlines, hasPadding);
|
4168
4168
|
var alignmentRow = formatAlignmentRow(maxColumnCount, columnAlignments, columnWidths, useTabs, hasPadding);
|
4169
|
-
|
4169
|
+
return "".concat(headerRow, "\n").concat(alignmentRow);
|
4170
|
+
}
|
4171
|
+
function formatBodyRows(inputData, maxColumnCount, columnAlignments, columnWidths, useTabs, replaceNewlines, hasPadding) {
|
4172
|
+
return inputData.inputDataBody
|
4170
4173
|
.map(function (currentRow) {
|
4171
4174
|
return formatMarkdownRow(maxColumnCount, currentRow, columnAlignments, columnWidths, useTabs, replaceNewlines, hasPadding);
|
4172
4175
|
})
|
4173
4176
|
.join('\n');
|
4174
|
-
|
4177
|
+
}
|
4178
|
+
function formatTableRows(inputData, maxColumnCount, columnAlignments, columnWidths, useTabs, replaceNewlines, hasPadding) {
|
4179
|
+
var headerAndAlignment = formatHeaderAndAlignment(inputData, maxColumnCount, columnAlignments, columnWidths, useTabs, replaceNewlines, hasPadding);
|
4180
|
+
var bodyRows = formatBodyRows(inputData, maxColumnCount, columnAlignments, columnWidths, useTabs, replaceNewlines, hasPadding);
|
4181
|
+
return "".concat(headerAndAlignment, "\n").concat(bodyRows);
|
4175
4182
|
}
|
4176
4183
|
function generateMarkdownTableString(inputData, columnAlignments, canAdjustColumnWidths, useTabs, replaceNewlines, hasPadding) {
|
4177
4184
|
if (canAdjustColumnWidths === void 0) { canAdjustColumnWidths = true; }
|