branch: externals/org
commit 5b426a280ef6a6a4422538d46d9faf5fb75237c6
Author: Ihor Radchenko <yanta...@posteo.net>
Commit: Ihor Radchenko <yanta...@posteo.net>

    lisp/ox-html.el (org-html-timestamp): Fix adding :post-blank twice
    
    Reported-by: Yue Yi <includeyy...@gmail.com>
    Link: 
https://orgmode.org/list/CAAMASZ3uWO+njzzLQtKnB=m+N-Z+q5OK5U=_beechozc9vu...@mail.gmail.com
---
 lisp/ox-html.el | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index 0ed16eb003..1fee9f05d9 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -3932,7 +3932,15 @@ information."
   "Transcode a TIMESTAMP object from Org to HTML.
 CONTENTS is nil.  INFO is a plist holding contextual
 information."
-  (let ((value (org-html-plain-text (org-timestamp-translate timestamp) info)))
+  (let* (
+         ;; Strip :post-blank
+         ;; It will be handled as a part of generic transcoder code
+         ;; so we should avoid double-counting post-blank.
+         (timestamp-no-blank
+          (org-element-put-property
+           (org-element-copy timestamp t)
+           :post-blank 0))
+         (value (org-html-plain-text (org-timestamp-translate 
timestamp-no-blank) info)))
     (format "<span class=\"timestamp-wrapper\"><span 
class=\"timestamp\">%s</span></span>"
            (replace-regexp-in-string "--" "&#x2013;" value))))
 

Reply via email to