mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-09-29 21:37:50 +00:00
ox: Fix parsing of example #+includes
* lisp/ox.el (org-export-parse-include-value): Since the example environment regexp does not contain a capture group, we can not assume we can call `replace-match' on the first capture group. Before doing so, check that the capture group indeed exists.
This commit is contained in:
parent
ce4f7db3c1
commit
a9ee43a124
|
@ -3420,7 +3420,8 @@ provided as the :unmatched parameter."
|
||||||
:org-include-induced-level))))
|
:org-include-induced-level))))
|
||||||
(args (and (eq env 'literal)
|
(args (and (eq env 'literal)
|
||||||
(prog1 (match-string 1 value)
|
(prog1 (match-string 1 value)
|
||||||
(setq value (replace-match "" nil nil value 1)))))
|
(when (match-string 1 value)
|
||||||
|
(setq value (replace-match "" nil nil value 1))))))
|
||||||
(block (and (or (string-match "\"\\(\\S-+\\)\"" value)
|
(block (and (or (string-match "\"\\(\\S-+\\)\"" value)
|
||||||
(string-match "\\<\\(\\S-+\\)\\>" value))
|
(string-match "\\<\\(\\S-+\\)\\>" value))
|
||||||
(or (= (match-beginning 0) 0)
|
(or (= (match-beginning 0) 0)
|
||||||
|
|
Loading…
Reference in a new issue