org.el (org-display-inline-images): Search for #+ATTR within the current paragraph

* org.el (org-display-inline-images): Search for #+ATTR within
the current paragraph.
This commit is contained in:
Bastien Guerry 2012-09-27 23:30:52 +02:00
parent 1a1d062510
commit 570083d2ad
1 changed files with 5 additions and 3 deletions

View File

@ -17961,9 +17961,11 @@ BEG and END default to the buffer boundaries."
(null org-image-actual-width))
(save-excursion
(save-match-data
(move-beginning-of-line 0)
(if (looking-at "#\\+ATTR.*width=\"\\([^\"]+\\)\"")
(string-to-number (match-string 1))))))
(when (re-search-backward
"#\\+ATTR.*width=\"\\([^\"]+\\)\""
(save-excursion
(re-search-backward "^[ \t]*$\\|\\`" nil t)) t)
(string-to-number (match-string 1))))))
width (cond ((eq org-image-actual-width t) nil)
((null org-image-actual-width) attrwidth)
((numberp org-image-actual-width)