[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/subed daaf480 340/389: subed-vtt: Fix navigation code
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/subed daaf480 340/389: subed-vtt: Fix navigation code |
Date: |
Fri, 3 Dec 2021 11:00:54 -0500 (EST) |
branch: elpa/subed
commit daaf480abc2a0f8e90d5d5687209d3be4e7b07ab
Author: Sacha Chua <sacha@sachachua.com>
Commit: Random User <rndusr@posteo.de>
subed-vtt: Fix navigation code
* subed/subed-vtt.el (subed-vtt--jump-to-subtitle-end): Use timestamp
as delimiter.
(subed-vtt--backward-subtitle-id): Use timestamp.
(subed-vtt--prepend-subtitle): Use timestamp instead of ID
---
subed/subed-vtt.el | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/subed/subed-vtt.el b/subed/subed-vtt.el
index c736a7c..574501d 100644
--- a/subed/subed-vtt.el
+++ b/subed/subed-vtt.el
@@ -232,7 +232,7 @@ can be found."
;; `subed-vtt--regexp-separator' here because if subtitle text is empty,
;; it may be the only empty line in the separator, i.e. there's only one
;; "\n".
- (let ((regex (concat
"\\([[:blank:]]*\n+[0-9]+\n\\|\\([[:blank:]]*\n*\\)\\'\\)")))
+ (let ((regex (concat "\\([[:blank:]]*\n+" subed-vtt--regexp-timestamp
"\\|\\([[:blank:]]*\n*\\)\\'\\)")))
(when (re-search-forward regex nil t)
(goto-char (match-beginning 0))))
(unless (= (point) orig-point)
@@ -252,7 +252,7 @@ Return point or nil if there is no previous subtitle."
(interactive)
(let ((orig-point (point)))
(when (subed-vtt--jump-to-subtitle-id)
- (if (re-search-backward (concat "\\(" subed-vtt--regexp-separator
"\\|\\`[[:space:]]*\\)" "\\([0-9]+\\)\n") nil t)
+ (if (re-search-backward (concat "\\(" subed-vtt--regexp-separator
"\\|\\`[[:space:]]*\\)\\(" subed-vtt--regexp-timestamp "\\)") nil t)
(progn
(goto-char (match-beginning 2))
(point))
@@ -369,7 +369,7 @@ Return new point."
(subed-vtt--jump-to-subtitle-id)
(insert (subed-vtt--make-subtitle id start stop text))
(save-match-data
- (when (looking-at "\\([[:space:]]*\\|^\\)[0-9]+$")
+ (when (looking-at (concat "\\([[:space:]]*\\|^\\)"
subed-vtt--regexp-timestamp))
(insert "\n")))
(forward-line -2)
(subed-vtt--jump-to-subtitle-text))
- [nongnu] elpa/subed 05ba952 320/389: Only add subtitles file if subed-subtitle-id returns non-nil, (continued)
- [nongnu] elpa/subed 05ba952 320/389: Only add subtitles file if subed-subtitle-id returns non-nil, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed ea11119 321/389: Inform compiler about unused variables to prevent warnings, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed e8a68c2 322/389: subed-srt--msecs-to-timestamp: Explain save-match-data, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 5c39418 323/389: Copy subed-srt--msecs-to-timestamp to subed-common.el, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed ecfec2b 325/389: Move debugging functions to subed-debug.el, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed f69f769 327/389: Set subed-mode-map in subed.el, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed d110f79 329/389: Stop disabling point-to-player sync on file-loaded event, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed dd4dc8c 332/389: Automatically disable point-to-player sync while looping, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 5957cbe 333/389: Set default subed-loop-seconds-after/before to 1, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed e71a64b 339/389: Refactor common code into subed-mpv-play-video, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed daaf480 340/389: subed-vtt: Fix navigation code,
ELPA Syncer <=
- [nongnu] elpa/subed 9642945 346/389: Further fixes to let tests pass, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 0968590 344/389: Fix separator search in subed-srt--validate, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 9e661cc 351/389: New command subed-split-subtitle splits at point with MPV timestamp, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed a63c362 252/389: More work on README, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed b5da89e 254/389: Move defgroup to the top, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 7d5c543 255/389: Add function: subed-srt--init, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 3036e7c 256/389: Remove stale comment, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed df51c44 258/389: Rename test file for common functions, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed c1e05c6 259/389: Remove empty line, ELPA Syncer, 2021/12/03
- [nongnu] elpa/subed 9f0c939 260/389: subed-for-each-subtitle: Make all arguments mandatory, ELPA Syncer, 2021/12/03