Skip to content

Commit

Permalink
fix: support timestamp without "." symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuiffy committed Mar 7, 2023
1 parent a3b860f commit 343d4c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/extractSentence.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export function extractSentence(sentence: string) {
return sentence
.replace("0:", "0.0") // 修复第0秒
.match(/\s*(\d+[\.:]\d+)(.*)/);
.match(/^\s*(\d+[\.:]?\d+?)([::秒 ].*)/);
}

0 comments on commit 343d4c6

Please sign in to comment.