pan93412 3a204dc7bb
refactor(utils/lyric): more powerful role matcher (#1505)
* refactor(utils/lyric): more powerful role matcher

- 可以拉出角色 (role) 和名字 (name):
  `const { role, name } = line.groups as { role: string, name?: string }`

- 移除掉某些不需要的 regex 部分(如 `\s\S`)

- 簡化部分 regex(如 `(:|:)` 更改為 `[::]`)

- 增加測試 (<https://regexr.com/6j8pf>)

* fix(utils/lyric): add `/ (regex) /` back
2022-04-12 22:19:46 +08:00
..
2022-04-12 01:48:14 +08:00