[Top][All Lists]

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

[elpa] master ec66576: * packages/markchars/markchars.el: Strip combinin

From: Juri Linkov
Subject: [elpa] master ec66576: * packages/markchars/markchars.el: Strip combining characters (bug#36923)
Date: Wed, 7 Aug 2019 17:44:04 -0400 (EDT)

branch: master
commit ec66576b8028c3559f50a5115c5e951fcf43f77f
Author: Juri Linkov <address@hidden>
Commit: Juri Linkov <address@hidden>

    * packages/markchars/markchars.el: Strip combining characters (bug#36923)
 packages/markchars/markchars.el | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/packages/markchars/markchars.el b/packages/markchars/markchars.el
index 152d728..7d7fe29 100644
--- a/packages/markchars/markchars.el
+++ b/packages/markchars/markchars.el
@@ -157,6 +157,12 @@ By default it matches nonascii-chars."
 (defun markchars--render-confusables (beg end)
   "Assign markchars confusable properties between BEG and END."
   (let* ((text (buffer-substring-no-properties beg end))
+         ;; Strip combining characters (bug#36923)
+         (text (mapconcat (lambda (c)
+                            (when (zerop (get-char-code-property
+                                          c 'canonical-combining-class))
+                              (string c)))
+                          (string-to-list text) ""))
          (scripts (mapcar
                    (lambda (c) (aref char-script-table c))
                    (string-to-list text)))

reply via email to

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