From: Alan Schmitt Date: Tue, 21 Apr 2015 06:21:01 +0000 (+0200) Subject: remove newlines, tabs, and multi spaces from title X-Git-Url: https://git.donarmstrong.com/?p=org-ref.git;a=commitdiff_plain;h=7f594acb917a800c221000f40d2a3a9480d9e4ad remove newlines, tabs, and multi spaces from title --- diff --git a/org-ref.el b/org-ref.el index 8424837..b9fcf30 100644 --- a/org-ref.el +++ b/org-ref.el @@ -484,7 +484,9 @@ environment, only %l is available." ;; strip enclosing brackets from title if they are there ((= l ?t) (org-ref-reftex-get-bib-field "title" entry)) ((= l ?T) (reftex-abbreviate-title - (org-ref-reftex-get-bib-field "title" entry))) + ((replace-regexp-in-string + "\n\\|\t\\|\s+" " " + (org-ref-reftex-get-bib-field "title" entry))))) ((= l ?v) (org-ref-reftex-get-bib-field "volume" entry)) ((= l ?y) (org-ref-reftex-get-bib-field "year" entry))))) @@ -496,7 +498,6 @@ environment, only %l is available." (setq format (replace-match "%" t t format))) (while (string-match "[ ,.;:]*%<" format) (setq format (replace-match "" t t format))) - ;; also replace carriage returns, tabs, and multiple whitespaces format) (defun org-ref-get-bibtex-entry-citation (key)