[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] org-export: Remove zero-width space escapes during export

From: Max Nikulin
Subject: Re: [PATCH] org-export: Remove zero-width space escapes during export
Date: Tue, 26 Jul 2022 23:38:56 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0

On 26/07/2022 19:59, Ihor Radchenko wrote:

This is a bug. While escape symbols do not affect export in most common
scenarios, your report is adding yet another case when zero-width space
is actually altering the export result.

I agree is zero-width space used as an escape character is too intrusive. It adds stray line breakpoints, it may be unwanted during copy&paste of text, especially if such text is code or a command.

I am attaching a tentative patch that will make Org export remove
zero-width spaces when those spaces actually separate the object

Any objections?

I think, you broke a valid use case when zero width space allows to wrap objects in the case of narrow page


It was briefly discussed, see
Nicolas Goaziou. Re: Org-syntax: Intra-word markup. Fri, 03 Dec 2021 00:05:33 +0100

The idea was indeed inspired by Markdown.
However, Markdown is different - **bold** is the official syntax to
indicate bold markup.

Or by asciidoc https://list.orgmode.org/1ef0e093-c165-2a5f-954d-6a33b64c8ee9@mailbox.org/

+        (setq processed-string
+              (replace-regexp-in-string "\\`​" "" string))
+        (setq processed-string
+              (replace-regexp-in-string "​\\'" "" processed-string))

Please, use \u200B instead of the invisible character.
info "(elisp) Non-ASCII Characters in Strings"

reply via email to

[Prev in Thread] Current Thread [Next in Thread]