galaxykate / tracery

Tracery: a story-grammar generation library for javascript
Apache License 2.0
2.11k stars 246 forks source link

Capitalize the first alphabet character #39

Open celesteh opened 6 years ago

celesteh commented 6 years ago

If the user wishes to make a word a hashtag, the capitalize modifier should capitalise the first letter. Right now, it sees the first character is a # and thus does nothing.

Example case:

"system":["\\#communism", "\\#socialism", "universal basic income (\\#UBI)"],
"origin": ["#system.capitalize# is better than feudalism!"]

Obviously there's a workaround for this, but it's slightly messy.