Bastien <b...@gnu.org> writes:

> If we do this, I don't see the need to enforce case sensitivity.

I attach a patch that illustrates the fix I propose on top on my
previous commit.

With this,

========================================================================
<<<Hello \alpha world>>>

Let's say hello \alpha world to test.
========================================================================

gets converted into

========================================================================
<p>
<a id="Hello-alpha-world">Hello &alpha; world</a>
</p>

<p>
Let's say <a href="#Hello-alpha-world">hello &alpha; world</a> to test.
</p>
========================================================================

which I think is what the OP expected.  We preserve case sensitivity
of the target, and we preserve the link description.

(I think the confusion comes from calling "path" what is really the
description when path and description are the same, like in a link
to a radio target.)

Let me know what you think,

diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index 4d6180d..0cacd57 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -2775,9 +2775,13 @@ INFO is a plist holding contextual information.  See
       (let ((destination (org-export-resolve-radio-link link info)))
 	(when destination
 	  (format "<a href=\"#%s\"%s>%s</a>"
-		  (org-export-data (org-element-contents destination) info)
+		  (org-export-solidify-link-text
+		   (org-export-data (org-element-contents destination) info))
 		  attributes
-		  (org-export-solidify-link-text path)))))
+		  (org-export-data
+		   (org-element-parse-secondary-string
+		    path
+		    (org-element-restriction 'paragraph)) info)))))
      ;; Links pointing to a headline: Find destination and build
      ;; appropriate referencing command.
      ((member type '("custom-id" "fuzzy" "id"))
-- 
 Bastien

Reply via email to