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

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

[nongnu] elpa/subed 0968590 344/389: Fix separator search in subed-srt--


From: ELPA Syncer
Subject: [nongnu] elpa/subed 0968590 344/389: Fix separator search in subed-srt--validate
Date: Fri, 3 Dec 2021 11:00:54 -0500 (EST)

branch: elpa/subed
commit 0968590ad30f2699afa0efa7b5648ffadaacd886
Author: Jun Inoue <jun.lambda@gmail.com>
Commit: Jun Inoue <jun.lambda@gmail.com>

    Fix separator search in subed-srt--validate
    
    Before this fix, subed-srt--validate was not scanning most of the
    file.  The reason is that [[^\\']] matches the literal characters [,
    ^, \, or ', followed by a ].  The intent was probably to reject
    end-of-buffer, but that's already handled by the subsequent
    looking-at.
---
 subed/subed-srt.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/subed/subed-srt.el b/subed/subed-srt.el
index d738ea8..3a12a2d 100644
--- a/subed/subed-srt.el
+++ b/subed/subed-srt.el
@@ -513,7 +513,7 @@ scheduled call is canceled and another call is scheduled in
       (save-match-data
         (let ((orig-point (point)))
           (goto-char (point-min))
-          (while (and (re-search-forward (format "\\(%s[[^\\']]\\|\\`\\)" 
subed-srt--regexp-separator) nil t)
+          (while (and (re-search-forward (format "\\(%s\\|\\`\\)" 
subed-srt--regexp-separator) nil t)
                       (looking-at "[[:alnum:]]"))
             (unless (looking-at "^[0-9]+$")
               (error "Found invalid subtitle ID: %S" (substring (or 
(thing-at-point 'line :no-properties) "\n") 0 -1)))



reply via email to

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