Cleanup espeak IPA output.
--- a/contrib/gadict.el Thu Jan 26 22:46:12 2017 +0200
+++ b/contrib/gadict.el Thu Jan 26 23:07:23 2017 +0200
@@ -38,6 +38,10 @@
"Remove whitespace at the beginning and end of S."
(gadict--trim-left (gadict--trim-right s)))
+(defun gadict--espeak-cleanup (s)
+ "Cleanup espeak IPA output."
+ (replace-regexp-in-string "[\x200D]" "" (gadict--trim s)))
+
(defconst gadict--pos '("n" "v" "adj" "adv" "pron" "det" "prep" "num" "conj" "int" "phr" "phr.v" "contr" "abbr" "prefix")
"Defined parts of speech.")
@@ -302,7 +306,7 @@
"Default voice for espeak. Used in article template.")
(defun gadict-espeak-ipa (str &optional voice)
- (gadict--trim
+ (gadict--espeak-cleanup
(shell-command-to-string
(format "%s %s %s %s"
gadict-espeak-program