Skip to content

Commit

Permalink
fix: fixed codeql alert
Browse files Browse the repository at this point in the history
  • Loading branch information
maxwiseman committed Dec 17, 2024
1 parent aa41f52 commit 9f12b37
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/downloader/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ for (let i = 0; i < hrefs.length; i++) {
.split(/[~_]*(?=BONUS|TOSS.?UP)[~_]*/);

const regex =
/.*(?<type>TOSS.UP|BONUS)\s*(?<number>\d+)[).]\s*(?<topic>[A-z\s]+)\s*.?\s+(?<type2>Short [Aa]nswer|Multiple [Cc]hoice)[.]?\s*(?<question>.*?)ANSWER. (?<answer>.*)/;
/.*(?<type>TOSS.UP|BONUS)\s*(?<number>\d+)[).]\s*(?<topic>[A-Za-z\s]+)\s*.?\s+(?<type2>Short [Aa]nswer|Multiple [Cc]hoice)[.]?\s*(?<question>.*?)ANSWER. (?<answer>.*)/;
const mcqRegex =
/.*(?<type>TOSS.UP|BONUS)\s*(?<number>\d+)[).]\s*(?<topic>[A-z\s]+)\s*.?\s+(?<type2>Short [Aa]nswer|Multiple [Cc]hoice)[.]?\s*(?<question>.*?)[A-Z]\).*ANSWER. (?<answer>.*)/;
/.*(?<type>TOSS.UP|BONUS)\s*(?<number>\d+)[).]\s*(?<topic>[A-Za-z\s]+)\s*.?\s+(?<type2>Short [Aa]nswer|Multiple [Cc]hoice)[.]?\s*(?<question>.*?)[A-Z]\).*ANSWER. (?<answer>.*)/;

const mcqAnswerRegex =
/(?<letter>[W-Zw-z1-4])\) (?<answer>[^X]*?)(?=\s*[A-Z]\)|$)/g;
Expand Down

0 comments on commit 9f12b37

Please sign in to comment.