forked from mirrors/org-mode
ox-ascii: Fix tables with a width cookie
* lisp/ox-ascii.el (org-ascii--table-cell-width): Correctly export tables with width cookies.
This commit is contained in:
parent
be9a1638af
commit
a5beff869f
|
@ -1665,20 +1665,25 @@ are ignored."
|
||||||
(or (gethash key cache)
|
(or (gethash key cache)
|
||||||
(puthash
|
(puthash
|
||||||
key
|
key
|
||||||
(or (and (not org-ascii-table-widen-columns)
|
(let ((cookie-width (org-export-table-cell-width table-cell info)))
|
||||||
(org-export-table-cell-width table-cell info))
|
(or (and (not org-ascii-table-widen-columns) cookie-width)
|
||||||
(let* ((max-width 0))
|
(let ((contents-width
|
||||||
(org-element-map table 'table-row
|
(let ((max-width 0))
|
||||||
(lambda (row)
|
(org-element-map table 'table-row
|
||||||
(setq max-width
|
(lambda (row)
|
||||||
(max (string-width
|
(setq max-width
|
||||||
(org-export-data
|
(max (string-width
|
||||||
(org-element-contents
|
(org-export-data
|
||||||
(elt (org-element-contents row) col))
|
(org-element-contents
|
||||||
info))
|
(elt (org-element-contents row) col))
|
||||||
max-width)))
|
info))
|
||||||
info)
|
max-width)))
|
||||||
max-width))
|
info)
|
||||||
|
max-width)))
|
||||||
|
(cond ((not cookie-width) contents-width)
|
||||||
|
(org-ascii-table-widen-columns
|
||||||
|
(max cookie-width contents-width))
|
||||||
|
(t cookie-width)))))
|
||||||
cache))))
|
cache))))
|
||||||
|
|
||||||
(defun org-ascii-table-cell (table-cell contents info)
|
(defun org-ascii-table-cell (table-cell contents info)
|
||||||
|
|
Loading…
Reference in New Issue