@@ -172,27 +172,29 @@ Arguments are the list of values ROW, the list of MAX-COL-WIDTHS, and delimiter
172
172
information in OUTPUT-MODE. Optionally use PAD-FN to pad each column value,
173
173
otherwise values will be padded to the right with spaces."
174
174
(let ((pad-fn (or pad-fn #'format-table-pad-right )))
175
- (list
176
- (plist-get output-mode :begin-row )
177
- (string-join
178
- (-zip-with pad-fn row max-col-widths)
179
- (plist-get output-mode :col-separator ))
180
- (plist-get output-mode :end-row )
181
- hard-newline)))
175
+ (append
176
+ (list
177
+ (plist-get output-mode :begin-row ))
178
+ (-interpose (plist-get output-mode :col-separator )
179
+ (-zip-with pad-fn row max-col-widths))
180
+ (list
181
+ (plist-get output-mode :end-row )
182
+ hard-newline))))
182
183
183
184
(defun format-table-generate-dash-string (length )
184
185
" Generate a string of hyphens LENGTH chars long."
185
186
(make-string length ?- ))
186
187
187
188
(defun format-table-render-separator-row (max-col-widths output-mode )
188
189
" Given the list of MAX-COL-WIDTHS and delimiter information in OUTPUT-MODE, render a row which separates the header row from the rest of the rows."
189
- (list
190
- (plist-get output-mode :separator-begin-row )
191
- (string-join
192
- (-map #'format-table-generate-dash-string max-col-widths)
193
- (plist-get output-mode :separator-col-separator ))
194
- (plist-get output-mode :separator-end-row )
195
- hard-newline))
190
+ (append
191
+ (list
192
+ (plist-get output-mode :separator-begin-row ))
193
+ (-interpose (plist-get output-mode :separator-col-separator )
194
+ (-map #'format-table-generate-dash-string max-col-widths))
195
+ (list
196
+ (plist-get output-mode :separator-end-row )
197
+ hard-newline)))
196
198
197
199
(defun format-table-render-json (table )
198
200
" Render the TABLE of values as a json string."
0 commit comments