Fix orgtbl-to-table.el function to include last cell border

* lisp/org/org-table.el (orgtbl-to-table.el): Perform character
replacement in the temp buffer and fix missing cell border.  (Bug#64205)

Copyright-paperwork-exempt: yes
This commit is contained in:
Jakub Ječmínek 2023-06-21 15:50:31 +02:00 committed by Robert Pluim
parent a23a09a82f
commit 4c01b0deee

View file

@ -6132,9 +6132,13 @@ supported."
(with-temp-buffer
(insert (orgtbl-to-orgtbl table params))
(org-table-align)
(replace-regexp-in-string
"-|" "-+"
(replace-regexp-in-string "|-" "+-" (buffer-substring 1 (buffer-size))))))
(goto-char (point-min))
(while (search-forward "-|" nil t)
(replace-match "-+"))
(goto-char (point-min))
(while (search-forward "|-" nil t)
(replace-match "+-"))
(buffer-string)))
(defun orgtbl-to-unicode (table params)
"Convert the `orgtbl-mode' TABLE into a table with unicode characters.