branch: elpa/adoc-mode
commit fd60143a1cbbc87c73eb9608059df28075290a89
Author: Bozhidar Batsov <[email protected]>
Commit: Bozhidar Batsov <[email protected]>

    Bound the closing-delimiter search in code block scanning
    
    The search for a code block's closing delimiter was unbounded (nil),
    scanning to end-of-buffer. Now bounded by
    adoc-font-lock-extend-after-change-max, consistent with the extend
    region function.
---
 adoc-mode.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/adoc-mode.el b/adoc-mode.el
index 36c4aca236..d9f2d5cb44 100644
--- a/adoc-mode.el
+++ b/adoc-mode.el
@@ -2104,7 +2104,8 @@ actual source code."
       (and (setq start-src (re-search-forward adoc-code-block-begin-regexp 
last noerror))
            (setq lang (or (match-string 1) t)
                  start-header (match-beginning 0))
-           (setq end-block (re-search-forward (format "\n%s$" (regexp-quote 
(match-string 2))) nil t))
+           (setq end-block (re-search-forward (format "\n%s$" (regexp-quote 
(match-string 2)))
+                                                   (+ (point) 
adoc-font-lock-extend-after-change-max) t))
            (setq end-src (match-beginning 0)))
       )
     (when end-block

Reply via email to