Hi Jambunathan,
Jambunathan K <[email protected]> writes:
> I am not sure whether (all) the exporters should be changed or just the
> API needs to be fixed.
I suggest to fix this in org-e-html.el with the attached patch.
There is another option: to set :raw-value for time-stamps, but
this feels a bit clumsy, especially when there is a :range-end.
(org-element-property :raw-value TIMESTAMP)
Let me know what you think.
diff --git a/contrib/lisp/org-e-html.el b/contrib/lisp/org-e-html.el
index f3daa17..c3d1bf2 100644
--- a/contrib/lisp/org-e-html.el
+++ b/contrib/lisp/org-e-html.el
@@ -2857,11 +2857,12 @@ information."
"Transcode a TIMESTAMP object from Org to HTML.
CONTENTS is nil. INFO is a plist holding contextual
information."
- (let ((value (org-translate-time (org-element-property :value timestamp)))
- (range-end (org-element-property :range-end timestamp)))
+ (let* ((f (if (eq (org-element-property :type timestamp) 'inactive) "[%s]" "<%s>"))
+ (value (org-translate-time (format f (org-element-property :value timestamp))))
+ (range-end (org-element-property :range-end timestamp)))
(format "<span class=\"timestamp-wrapper\"><span class=\"timestamp\">%s</span></span>"
(if (not range-end) value
- (concat value "–" (org-translate-time range-end))))))
+ (concat value "–" (org-translate-time (format f range-end)))))))
;;;; Underline
--
Bastien