]> git.donarmstrong.com Git - org-ref.git/blobdiff - org-ref.org
trim urls in case they have leading or trailing spaces.
[org-ref.git] / org-ref.org
index 632f807648422160bafeb5e7fc24c13c9489daeb..4e5b5415ba5182f6302e86727a526cafb6d1319a 100644 (file)
@@ -1776,14 +1776,14 @@ We need some convenience functions to open act on the citation at point. These w
         (catch 'done
           (let ((url (bibtex-autokey-get-field "url")))
             (when  url
-              (browse-url url)
+              (browse-url (s-trim url))
               (throw 'done nil)))
 
           (let ((doi (bibtex-autokey-get-field "doi")))
             (when doi
               (if (string-match "^http" doi)
                   (browse-url doi)
-                (browse-url (format "http://dx.doi.org/%s" doi)))
+                (browse-url (format "http://dx.doi.org/%s" (s-trim doi))))
               (throw 'done nil))))))))
 
 
@@ -3699,10 +3699,6 @@ _o_: Open entry   _e_: Email entry and pdf
           (email-bibtex-entry)) nil)))
 #+END_SRC
 
-#+RESULTS:
-: org-ref-cite-hydra/body
-
-cite:oberhofer-2013-first
 * End of code
 #+BEGIN_SRC emacs-lisp :tangle org-ref.el
 (provide 'org-ref)