Permalink
Browse files

Added an example in readme where the icon name has a hyphen in it.

Ruby 1.9 hash with a dash in a key

There are some legitimate symbols that cannot be used with the new syntax. I cannot find a reference, but it appears that a symbol name matching /[a-zA-Z_][a-zA-Z_0-9]*/ is allowed with the new syntax. If the symbol name contains special characters such as '-', you have to use the Ruby 1.8 syntax, :'my-symbol-name'

Signed-off-by: Keil Miller Jr <keilmillerjr@me.com>
  • Loading branch information...
1 parent 231ac28 commit f989208d38395d09e044692b760a7d0504b376a4 @keilmillerjr keilmillerjr committed Oct 11, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 README.md
View
@@ -41,6 +41,12 @@ awesome_icon(:ok, 'Okay :)').should == "<i class=\"icon-ok\"></i>Okay :)"
awesome_icon(:ok) { 'Okay :)'}.should == "<i class=\"icon-ok\"></i>Okay :)"
```
+For hyphenated icon names, surround the icon name with quotes:
+
+```ruby
+awesome_icon(:'bookmark-empty').should == "<i class=\"icon-bookmark-empty\"></i>"
+```
+
## Version
Font Awesome 2.0 is currently included. Enjoy :)

0 comments on commit f989208

Please sign in to comment.