diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2021-05-02 17:48:47 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2021-05-02 17:48:47 +0200 |
commit | ab82d6ae254666ffe605234d4f512ebdd37a9c0c (patch) | |
tree | 35b3ac6a4263ad2574bbea538314b42cf40250e2 | |
parent | 0e7153e63d20032d35dde1626004c86ba3fcf2c1 (diff) | |
download | org-mode-ab82d6ae254666ffe605234d4f512ebdd37a9c0c.tar.gz |
ox-ascii: Fix title when 2 width char is used
* lisp/ox-ascii.el (org-ascii-template--document-title): Find width of
title with `string-width' instead of counting characters.
Fixes: #48148
Reported-by: Shingo Tanaka <shingo.fg8@gmail.com>
-rw-r--r-- | lisp/ox-ascii.el | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/ox-ascii.el b/lisp/ox-ascii.el index 70bd1c4..0dfa3b4 100644 --- a/lisp/ox-ascii.el +++ b/lisp/ox-ascii.el @@ -1033,7 +1033,7 @@ INFO is a plist used as a communication channel." ;; Format TITLE. It may be filled if it is too wide, ;; that is wider than the two thirds of the total width. (title-len (min (apply #'max - (mapcar #'length + (mapcar #'string-width (org-split-string (concat title "\n" subtitle) "\n"))) (/ (* 2 text-width) 3))) |