Skip to content

Commit

Permalink
use smart quotes for callsigns to avoid Windows filename issue (#205)
Browse files Browse the repository at this point in the history
Fixes: #204
  • Loading branch information
zkat committed Jun 11, 2024
1 parent b157d36 commit 461e0d6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/entity/specs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ export const ENTITIES: Record<string, EntityDescriptor<EntitySpec>> = {
collectionId: "starforged/collections/oracles/characters",
label: "Character",
nameGen: (ent) =>
`${ent.givenName[0]?.simpleResult}${ent.callSign.length > 0 ? ' "' + ent.callSign[0].simpleResult + '"' : ""} ${ent.familyName[0]?.simpleResult}`,
// NB(@zkat): We use smart quotes here because `"` is an invalid
// character in Windows filenames and `'` looks like shit. They look
// nice anyway.
`${ent.givenName[0]?.simpleResult}${ent.callSign.length > 0 ? " “" + ent.callSign[0].simpleResult + "”" : ""} ${ent.familyName[0]?.simpleResult}`,
spec: {
givenName: {
id: "starforged/oracles/characters/name/given",
Expand Down

0 comments on commit 461e0d6

Please sign in to comment.