Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
settyan117 committed Apr 27, 2024
1 parent b18f833 commit 736b557
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions character-quiz/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@ const loadCharacters = async (author: string) => {
rating,
] = line.split(',');

const characterNames = characterName.split(/[&]/).filter((name) => name !== '');
const characterRubys = characterRuby.split(/[&]/).filter((name) => name !== '');
const characterNames = characterName.split('、').filter((name) => name !== '');
const characterRubys = characterRuby.split('、').filter((name) => name !== '');

if (characterNames.length === 0 || characterRubys.length === 0) {
return [] as CharacterData[];
}

const names = [...characterNames, ...characterRubys];
const namePartsList = names.map((name) => name.split(' '));
const namePartsList = names.map((name) => name.split(/[&\s]/));

const normalizedWorkName = workName.startsWith('"')
? workName.slice(1, -1)
Expand Down

0 comments on commit 736b557

Please sign in to comment.