markdown-up 3.3.7 → 3.3.8
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/dataTable.js +7 -2
- package/package.json +2 -2
package/lib/dataTable.js
CHANGED
|
@@ -50,6 +50,9 @@ struct DataTableFieldFormat
|
|
|
50
50
|
# If true, format the field as Markdown
|
|
51
51
|
optional bool markdown
|
|
52
52
|
|
|
53
|
+
# The field header (default is the field name)
|
|
54
|
+
optional string header
|
|
55
|
+
|
|
53
56
|
|
|
54
57
|
# A field alignment
|
|
55
58
|
enum DataTableFieldAlignment
|
|
@@ -140,18 +143,20 @@ export function dataTableElements(data, dataTable = null, options = null) {
|
|
|
140
143
|
'elem': [
|
|
141
144
|
categories.map((field) => {
|
|
142
145
|
const fieldFormat = (fieldFormats !== null ? (fieldFormats[field] ?? null) : null);
|
|
146
|
+
const formatHeader = (fieldFormat !== null ? (fieldFormat.header ?? null) : null);
|
|
143
147
|
return {
|
|
144
148
|
'html': 'th',
|
|
145
149
|
'attr': createFieldAttr(fieldFormat),
|
|
146
|
-
'elem': {'text': field}
|
|
150
|
+
'elem': {'text': formatHeader ?? field}
|
|
147
151
|
};
|
|
148
152
|
}),
|
|
149
153
|
tableFields.map((field) => {
|
|
150
154
|
const fieldFormat = (fieldFormats !== null ? (fieldFormats[field] ?? null) : null);
|
|
155
|
+
const formatHeader = (fieldFormat !== null ? (fieldFormat.header ?? null) : null);
|
|
151
156
|
return {
|
|
152
157
|
'html': 'th',
|
|
153
158
|
'attr': createFieldAttr(fieldFormat),
|
|
154
|
-
'elem': {'text': field}
|
|
159
|
+
'elem': {'text': formatHeader ?? field}
|
|
155
160
|
};
|
|
156
161
|
})
|
|
157
162
|
]
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "markdown-up",
|
|
4
|
-
"version": "3.3.
|
|
4
|
+
"version": "3.3.8",
|
|
5
5
|
"description": "MarkdownUp is a Markdown viewer",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"markdown",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"c8": "~10.1",
|
|
33
|
-
"eslint": "~9.
|
|
33
|
+
"eslint": "~9.18",
|
|
34
34
|
"jsdoc": "~4.0",
|
|
35
35
|
"jsdom": "~26.0"
|
|
36
36
|
}
|