瀏覽代碼

Use better regexp for finding image links

* lisp/org.el (org-display-inline-images): Improve regexp
Carsten Dominik 14 年之前
父節點
當前提交
d600831eb7
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      lisp/org.el

+ 1 - 2
lisp/org.el

@@ -16235,8 +16235,7 @@ BEG and END default to the buffer boundaries."
       (widen)
       (setq beg (or beg (point-min)) end (or end (point-max)))
       (goto-char (point-min))
-      ;; (let ((re (concat "\\[\\[\\(\\(file:\\)\\|\\([./~]\\)\\)\\([-+~.:/\\_0-9a-zA-Z ]+"
-      (let ((re (concat "\\[\\[\\(\\(file:\\)\\|\\([./~]\\)\\)\\([-+~.:/\\_0-9a-zA-Z \x00080-\xfffff]+"
+      (let ((re (concat "\\[\\[\\(\\(file:\\)\\|\\([./~]\\)\\)\\([^]\n]+?"
 			(substring (org-image-file-name-regexp) 0 -2)
 			"\\)\\]" (if include-linked "" "\\]")))
 	    old file ov img)