Closed theianjones closed 7 years ago
If there is more than one space, only the 1st space will be filled with a hyphen, regex replaces all of them. I can't think of any reasons not to use regex in this case. What do you think @tayiorbeii?
> "a string with spaces".replace(/\s/g, "+")
'a+string+with+spaces'
> "a string with spaces".replace(" ", "-")
'a-string with spaces'
@ijones16 Good call! Regex works 👍
Hey @ijones16, the 3.2.1
git tag never got pushed so a new npm version wont get published; did you run yarn bump
instead of bumping the package.json
version manully? If so, you must have had a dirty git state and the yarn bump
script threw an error. You'll need to run git push --tags
manually. In the future, make sure to commit, stage, push, then yarn bump
and then the package.json
version and git tags will match and a new npm version will get published.
Sorry about that, I ran yarn bump
but I think my git state was dirty.
I just ran git push --tags
@ijones16 Oh no problem, just wanted to make sure your package got pushed ok. You can see that it has been released correctly now so you should be good to yarn upgrade egghead-ui
and get 3.2.1
: https://www.npmjs.com/package/egghead-ui
Changes
notes:
If there were two toggles on the page the left radio input would toggle the first
Toggle