(text: string)
| 10 | // HTML转义函数 |
| 11 | const prefixes = getPrefixes(); |
| 12 | const mainPrefix = prefixes[0]; |
| 13 | |
| 14 | const parseTimeString = (timeStr: string): number => { |
| 15 | const match = timeStr.match(/^(\d+)([smhd])?$/i); |
| 16 | if (!match) return -1; |
| 17 | |
| 18 | const value = parseInt(match[1]); |
| 19 | const unit = match[2]?.toLowerCase() || 's'; |