Skip to content

Commit

Permalink
fix: Linkifying spells now ignores *
Browse files Browse the repository at this point in the history
  • Loading branch information
valentine195 committed May 5, 2024
1 parent 92ffc68 commit 26a1898
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/parser/linkify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,15 @@ class LinkifierClass extends Component {
return input;
}
linkifySpells(spells: string, context: string = ""): string {
return spells
return spells.replace(
/(.+?)(\*?,|\*?$)/g,
(_, spell, splitter) => `${this.linkify(spell, context)}${splitter}`
);

/* return spells
.split(",")
.map((spell) => this.linkify(spell, context))
.join(",");
.join(","); */
}

/**
Expand Down

0 comments on commit 26a1898

Please sign in to comment.