Skip to content

Commit

Permalink
fix deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
shiyiya committed Jul 13, 2024
1 parent 243bdc9 commit d47b594
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/danmaku/src/danmaku-parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ export function getMode(key: number): Comment['mode'] {

// http://jabbany.github.io/CommentCoreLibrary/docs/data-formats/bilibili-xml.html
export function danmakuParseFromXml(xmlString: string) {
//TODO: Named capturing groups are only available when targeting 'ES2018' or later.
//@ts-ignore
const matches = xmlString.matchAll(/<d (?:.*? )??p="(?<p>.+?)"(?: .*?)?>(?<text>.+?)<\/d>/gs)
const result: Comment[] = []
Array.from(matches).forEach((match) => {
Expand Down

0 comments on commit d47b594

Please sign in to comment.