branch: elpa/subed commit 0968590ad30f2699afa0efa7b5648ffadaacd886 Author: Jun Inoue <jun.lam...@gmail.com> Commit: Jun Inoue <jun.lam...@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)))