emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org a9ee43a124: ox: Fix parsing of example #+includes


From: ELPA Syncer
Subject: [elpa] externals/org a9ee43a124: ox: Fix parsing of example #+includes
Date: Sun, 22 Jan 2023 12:57:54 -0500 (EST)

branch: externals/org
commit a9ee43a1248f1daabb4aedb793314a223b2d4ba7
Author: TEC <git@tecosaur.net>
Commit: Ihor Radchenko <yantar92@posteo.net>

    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.
---
 lisp/ox.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/ox.el b/lisp/ox.el
index 759bd7875d..6fd72a2232 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -3420,7 +3420,8 @@ provided as the :unmatched parameter."
                                     :org-include-induced-level))))
          (args (and (eq env 'literal)
                     (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)
                          (string-match "\\<\\(\\S-+\\)\\>" value))
                      (or (= (match-beginning 0) 0)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]