Skip to content

Commit

Permalink
Make it easier to add new words at the beginning of titles
Browse files Browse the repository at this point in the history
Refs #261
  • Loading branch information
thewilkybarkid committed Jan 7, 2025
1 parent 1868d1f commit 174dbc8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/reviews.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ toc: false
# PREreviews ✍️

```js
import { capitalize } from 'npm:effect/String'

const parseDate = d3.utcParse('%Y-%m-%d')
const languageNames = new Intl.DisplayNames(['en-US'], { type: 'language' })
const languageName = code => (code ? languageNames.of(code) : 'Unknown')
Expand Down Expand Up @@ -97,7 +99,9 @@ const languageColor = Plot.scale({
},
})

const title = `${chosenCollaborative ? 'Collaborative ' : ''}${chosenRequest ? (chosenCollaborative ? 'requested ' : 'Requested ') : ''}${chosenType ? reviewType(chosenType) : ''} PREreviews${chosenPseudonym ? ' using a pseudonym' : ''}`
const title = capitalize(
`${chosenCollaborative ? 'collaborative ' : ''}${chosenRequest ? 'requested ' : ''}${chosenType ? reviewType(chosenType) : ''} PREreviews${chosenPseudonym ? ' using a pseudonym' : ''}`,
)

const titleWithYear = `${title} ${chosenYear ? ` in ${chosenYear}` : ''}`
```
Expand Down

0 comments on commit 174dbc8

Please sign in to comment.