--- lisp/org/ox.el.orig 2023-04-25 22:49:54.000000000 +0900 +++ lisp/org/ox.el 2023-09-07 19:01:02.522228900 +0900 @@ -148,6 +148,7 @@ (:with-timestamps nil "<" org-export-with-timestamps) (:with-title nil "title" org-export-with-title) (:with-todo-keywords nil "todo" org-export-with-todo-keywords) + (:with-zwsp nil "zwsp" org-export-with-zwsp) ;; Citations processing. (:cite-export "CITE_EXPORT" nil org-cite-export-processors)) "Alist between export properties and ways to set them. @@ -842,6 +843,13 @@ :group 'org-export-general :type 'boolean) +(defcustom org-export-with-zwsp t + "Non-nil means include zero-width-space(ZWSP) charactor in export. +When nil, remove all ZWSP charactors from the export. This option +can also be set with the OPTIONS keyword, e.g. \"zwsp:nil\"." + :group 'org-export-general + :type 'boolean) + (defcustom org-export-allow-bind-keywords nil "Non-nil means BIND keywords can define local variable values. This is a potential security risk, which is why the default value @@ -3161,10 +3169,18 @@ ;; Remove all text properties since they cannot be ;; retrieved from an external process. Finally call ;; final-output filter and return result. - (org-no-properties - (org-export-filter-apply-functions - (plist-get info :filter-final-output) - output info))))))))) + (if (plist-get info :with-zwsp) + (org-no-properties + (org-export-filter-apply-functions + (plist-get info :filter-final-output) + output info)) + (replace-regexp-in-string + (char-to-string #x200b) "" + (org-no-properties + (org-export-filter-apply-functions + (plist-get info :filter-final-output) + output info)))) + ))))))) ;;;###autoload (defun org-export-string-as (string backend &optional body-only ext-plist)