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

    Fix integer passed to concat in adoc-re-one-line-title
    
    When level is nil, the code passed an integer to concat, which
    treats it as a character code rather than a number string.  Use
    number-to-string to produce the correct regex quantifier.
---
 adoc-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/adoc-mode.el b/adoc-mode.el
index 84ca890e07..d263def232 100644
--- a/adoc-mode.el
+++ b/adoc-mode.el
@@ -974,7 +974,7 @@ match-data has these sub groups:
             4--4"
   (let* ((del (if level
                   (make-string (+ level 1) ?=)
-                (concat "=\\{1," (+ adoc-title-max-level 1) "\\}"))))
+                (concat "=\\{1," (number-to-string (1+ adoc-title-max-level)) 
"\\}"))))
     (concat
      "^\\(" del "[ \t]+\\)"                   ; 1
      "\\([^ \t\n].*?\\)"                          ; 2

Reply via email to