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

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

[nongnu] elpa/subed 9642945 346/389: Further fixes to let tests pass


From: ELPA Syncer
Subject: [nongnu] elpa/subed 9642945 346/389: Further fixes to let tests pass
Date: Fri, 3 Dec 2021 11:00:55 -0500 (EST)

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

    Further fixes to let tests pass
    
    SRT validation didn't allow milliseconds to be abbreviated like
    
      00:03:03,45 --> 00:03:15,5
    
    but the tests expected to allow them.  This commit fixes the behavior
    of the validator to match the test.
---
 subed/subed-srt.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/subed/subed-srt.el b/subed/subed-srt.el
index 3a12a2d..b00760c 100644
--- a/subed/subed-srt.el
+++ b/subed/subed-srt.el
@@ -519,7 +519,7 @@ scheduled call is canceled and another call is scheduled in
               (error "Found invalid subtitle ID: %S" (substring (or 
(thing-at-point 'line :no-properties) "\n") 0 -1)))
             (forward-line)
             ;; This regex is stricter than `subed-srt--regexp-timestamp'
-            (unless (looking-at 
"^[0-9]\\{2\\}:[0-9]\\{2\\}:[0-9]\\{2\\},[0-9]\\{3\\}")
+            (unless (looking-at 
"^[0-9]\\{2\\}:[0-9]\\{2\\}:[0-9]\\{2\\},[0-9]\\{,3\\}")
               (error "Found invalid start time: %S"  (substring (or 
(thing-at-point 'line :no-properties) "\n") 0 -1)))
             (when (re-search-forward "[[:blank:]]" (point-at-eol) t)
               (goto-char (match-beginning 0)))
@@ -529,7 +529,7 @@ scheduled call is canceled and another call is scheduled in
             (condition-case nil
                 (forward-char 5)
               (error nil))
-            (unless (looking-at 
"[0-9]\\{2\\}:[0-9]\\{2\\}:[0-9]\\{2\\},[0-9]\\{3\\}$")
+            (unless (looking-at 
"[0-9]\\{2\\}:[0-9]\\{2\\}:[0-9]\\{2\\},[0-9]\\{,3\\}$")
               (error "Found invalid stop time: %S" (substring (or 
(thing-at-point 'line :no-properties) "\n") 0 -1))))
           (goto-char orig-point))))))
 



reply via email to

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