]> git.donarmstrong.com Git - org-ref.git/blobdiff - org-ref.el
remove empty links and doi
[org-ref.git] / org-ref.el
index 4ad23bd0023dff86aaa39525e99965a46b7339e0..cf279584d0a22b7fb1a085a03ffe6061cd2c2333 100644 (file)
@@ -551,6 +551,9 @@ Format according to the type in `org-ref-bibliography-entry-format'."
     (setq output (replace-regexp-in-string " {\\(.*\\)} " " \\1 " output))
     ;; get rid of empty parens
     (setq output (replace-regexp-in-string "()" "" output))
+    ;; get rid of empty link and doi
+    (setq output (replace-regexp-in-string " <a href=\"\">link</a>\\." "" output))
+    (setq output (replace-regexp-in-string " <a href=\"http://dx\\.doi\\.org/\">doi</a>\\." "" output))
     (format "<li><a id=\"%s\">[%s] %s</a></li>"
            key key output)))