Skip to content

Commit

Permalink
Added some whitespace for better readability
Browse files Browse the repository at this point in the history
  • Loading branch information
szajbus committed Nov 4, 2017
1 parent 167bae6 commit cc6e107
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/saxy/element.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ def attribute_name(name)

def underscore(word)
word = word.dup
word.gsub!(/([A-Z\d]+)([A-Z][a-z])/,'\1_\2')
word.gsub!(/([a-z\d])([A-Z])/,'\1_\2')
word.gsub!(/([A-Z\d]+)([A-Z][a-z])/, '\1_\2')
word.gsub!(/([a-z\d])([A-Z])/, '\1_\2')
word.tr!("-", "_")
word.downcase!
word
Expand Down

0 comments on commit cc6e107

Please sign in to comment.