babel: fixed bug dealing with ignoring quoted inline code blocks
* contrib/babel/lisp/org-babel-exp.el (org-babel-exp-inline-src-blocks): fixed bug dealing with ignoring quoted inline code blocks
This commit is contained in:
parent
5068f4a5cf
commit
4fb9fa323e
|
@ -97,11 +97,12 @@ options and are taken from `org-babel-defualt-inline-header-args'."
|
||||||
(goto-char start)
|
(goto-char start)
|
||||||
(while (and (< (point) end)
|
(while (and (< (point) end)
|
||||||
(re-search-forward org-babel-inline-src-block-regexp end t))
|
(re-search-forward org-babel-inline-src-block-regexp end t))
|
||||||
(unless (org-babel-in-example-or-verbatim)
|
(let* ((info (save-match-data (org-babel-parse-inline-src-block-match)))
|
||||||
(let* ((info (save-match-data (org-babel-parse-inline-src-block-match)))
|
(params (third info))
|
||||||
(params (third info))
|
(replacement
|
||||||
(replacement
|
(save-match-data
|
||||||
(save-match-data
|
(if (org-babel-in-example-or-verbatim)
|
||||||
|
(buffer-substring (match-beginning 0) (match-end 0))
|
||||||
;; expand noweb references in the original file
|
;; expand noweb references in the original file
|
||||||
(setf (second info)
|
(setf (second info)
|
||||||
(if (and (cdr (assoc :noweb params))
|
(if (and (cdr (assoc :noweb params))
|
||||||
|
@ -109,10 +110,9 @@ options and are taken from `org-babel-defualt-inline-header-args'."
|
||||||
(org-babel-expand-noweb-references
|
(org-babel-expand-noweb-references
|
||||||
info (get-file-buffer org-current-export-file))
|
info (get-file-buffer org-current-export-file))
|
||||||
(second info)))
|
(second info)))
|
||||||
(message "info:%S" info)
|
(org-babel-exp-do-export info 'inline)))))
|
||||||
(org-babel-exp-do-export info 'inline))))
|
(setq end (+ end (- (length replacement) (length (match-string 1)))))
|
||||||
(setq end (+ end (- (length replacement) (length (match-string 1)))))
|
(replace-match replacement t t nil 1)))))
|
||||||
(replace-match replacement t t nil 1))))))
|
|
||||||
|
|
||||||
(defun org-babel-in-example-or-verbatim ()
|
(defun org-babel-in-example-or-verbatim ()
|
||||||
"Return true if the point is currently in an escaped portion of
|
"Return true if the point is currently in an escaped portion of
|
||||||
|
|
Loading…
Reference in New Issue