diff options
-rw-r--r-- | thogai.el | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -255,8 +255,14 @@ External callers should always pass nil as the value." ((pred (lambda (str) (string-suffix-p "^}" str))) (thogai-insert-translation - (concat (string-remove-prefix "{" (string-remove-suffix "^}" translation)) - "{^}") + (concat + (let ((unwrapped (string-remove-prefix "{" (string-remove-suffix "^}" translation)))) + ;; If `translation' is a capitalization carry prefix, wrap + ;; it up again. + (if (string-prefix-p "~|" unwrapped) + (concat "{" unwrapped "}") + unwrapped)) + "{^}") non-first-part-p)) ;; Carry capitalization. ((pred (lambda (str) |