bare-script 3.8.5 → 3.8.6
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/lib/include/dataTable.bare +12 -1
- package/package.json +1 -1
|
@@ -127,7 +127,7 @@ function dataTableMarkdown(data, model):
|
|
|
127
127
|
value = objectGet(row, field)
|
|
128
128
|
valueType = systemType(value)
|
|
129
129
|
if valueType == 'string':
|
|
130
|
-
valueFormat = value
|
|
130
|
+
valueFormat = stringTrim(value)
|
|
131
131
|
elif valueType == 'number':
|
|
132
132
|
valueFormat = numberToFixed(value, precisionNumber, precisionTrim)
|
|
133
133
|
elif valueType == 'datetime':
|
|
@@ -135,6 +135,12 @@ function dataTableMarkdown(data, model):
|
|
|
135
135
|
else:
|
|
136
136
|
valueFormat = stringNew(value)
|
|
137
137
|
endif
|
|
138
|
+
|
|
139
|
+
# Eliminate value string newlines
|
|
140
|
+
valueFormat = regexReplace(dataTableMarkdownRegexMultipleNewline, valueFormat, '<br><br>')
|
|
141
|
+
valueFormat = regexReplace(dataTableMarkdownRegexSingleNewline, valueFormat, ' ')
|
|
142
|
+
|
|
143
|
+
# Set the field value string
|
|
138
144
|
objectSet(rowFormat, field, valueFormat)
|
|
139
145
|
|
|
140
146
|
# Update the field width
|
|
@@ -190,6 +196,11 @@ function dataTableMarkdown(data, model):
|
|
|
190
196
|
endfunction
|
|
191
197
|
|
|
192
198
|
|
|
199
|
+
# Field value newline replacement regular expressions
|
|
200
|
+
dataTableMarkdownRegexMultipleNewline = regexNew('\r?\n(?:\r?\n)+')
|
|
201
|
+
dataTableMarkdownRegexSingleNewline = regexNew('\r?\n')
|
|
202
|
+
|
|
203
|
+
|
|
193
204
|
# Helper to generate the Markdown field text
|
|
194
205
|
function dataTableMarkdownField(value, width, align, fill):
|
|
195
206
|
spaces = width - stringLength(value)
|