Sfoglia il codice sorgente

ox-ascii: Tiny fix

* lisp/ox-ascii.el (org-ascii--indent-string): Fix regexp to avoid
  stack overflow in regexp matcher on very long lines.
Nicolas Goaziou 11 anni fa
parent
commit
ae8fd7a139
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      lisp/ox-ascii.el

+ 1 - 1
lisp/ox-ascii.el

@@ -455,7 +455,7 @@ HOW determines the type of justification: it can be `left',
 Empty lines are not indented."
   (when (stringp s)
     (replace-regexp-in-string
-     "\\(^\\)\\(?:.*\\S-\\)" (make-string width ? ) s nil nil 1)))
+     "\\(^\\)[ \t]*\\S-" (make-string width ?\s) s nil nil 1)))
 
 (defun org-ascii--box-string (s info)
   "Return string S with a partial box to its left.