leemeichin / ask_awesomely

Build Typeforms awesomely. In Ruby.
MIT License
101 stars 12 forks source link

escape spaces in fonts with multiple words #18

Closed fhinson closed 8 years ago

fhinson commented 8 years ago

Previously, fonts with multiple words like "Open Sans" or "Source Sans Pro" were being added to the VALID_WORDS array as ["Open", "Sans"] due to the way the %w() function handles spaces. As a result, "Open Sans" would not be viewed as a valid font.

I solved this by escaping the spaces in the array.

leemeichin commented 8 years ago

Thanks for this and for all the issues you've raised so far, I really appreciate it! I just saw the notification thinking it was a bug report, and pushed up a fix myself before taking a look.

fhinson commented 8 years ago

No problem — thanks for the quick help