Replace newlines in def when creating candidates

This commit is contained in:
TEC 2022-07-13 23:06:26 +08:00
parent 5c40c17a68
commit 8696ebb755
Signed by: tec
GPG Key ID: 779591AFDB81F06C
1 changed files with 8 additions and 6 deletions

View File

@ -1797,12 +1797,14 @@ Where TERM-TEXT is constructed by `org-glossary--select-term-candidatify'."
(truncate-string-to-width
(org-glossary--select-term-group term-text nil)
9 0 ?\s))
(string-trim
(substring-no-properties
(org-element-interpret-data
(plist-get
(get-text-property 0 'org-glossary--term term-text)
:value))))))
(replace-regexp-in-string
"\n\s*" " "
(string-trim
(substring-no-properties
(org-element-interpret-data
(plist-get
(get-text-property 0 'org-glossary--term term-text)
:value)))))))
(defun org-glossary--select-term-group (term-text transform)
"Construct the group of TERM-TEXT.