File tree Expand file tree Collapse file tree 1 file changed +32
-18
lines changed Expand file tree Collapse file tree 1 file changed +32
-18
lines changed Original file line number Diff line number Diff line change @@ -114,24 +114,38 @@ export const exportNotebookAsHtml = vscode.commands.registerCommand(`vscode-db2i
114
114
}
115
115
116
116
if ( fallbackToTable ) {
117
- cellContents . push ( [
118
- `<table style="width: 100%; margin-left: auto; margin-right: auto;">` ,
119
- `<thead>` ,
120
- `<tr>` ,
121
- columns . map ( c => `<th>${ c } </th>` ) . join ( `` ) ,
122
- `</tr>` ,
123
- `</thead>` ,
124
- `<tbody>` ,
125
- table . map ( row => {
126
- return [
127
- `<tr>` ,
128
- keys . map ( key => `<td>${ row [ key ] } </td>` ) . join ( `` ) ,
129
- `</tr>`
130
- ] . join ( `` ) ;
131
- } ) . join ( `` ) ,
132
- `</tbody>` ,
133
- `</table>`
134
- ] . join ( `` ) ) ;
117
+ cellContents . push (
118
+ [
119
+ `<table style="width: 100%; margin-left: auto; margin-right: auto;">` ,
120
+ `<thead>` ,
121
+ `<tr>` ,
122
+ columns
123
+ . map (
124
+ ( c ) =>
125
+ `<th style="text-align: left;">${ c } </th>`
126
+ )
127
+ . join ( `` ) ,
128
+ `</tr>` ,
129
+ `</thead>` ,
130
+ `<tbody>` ,
131
+ table
132
+ . map ( ( row ) => {
133
+ return [
134
+ `<tr>` ,
135
+ keys
136
+ . map (
137
+ ( key ) =>
138
+ `<td style="text-align: left;">${ row [ key ] } </td>`
139
+ )
140
+ . join ( `` ) ,
141
+ `</tr>` ,
142
+ ] . join ( `` ) ;
143
+ } )
144
+ . join ( `` ) ,
145
+ `</tbody>` ,
146
+ `</table>` ,
147
+ ] . join ( `` )
148
+ ) ;
135
149
}
136
150
} else {
137
151
// items.push(vscode.NotebookCellOutputItem.stderr(`No rows returned from statement.`));
You can’t perform that action at this time.
0 commit comments