Skip to content

Commit

Permalink
Fixed capitalize-preserve
Browse files Browse the repository at this point in the history
  • Loading branch information
tecknojock authored and irisfofs committed Jul 17, 2017
1 parent 32eaeed commit 853a54c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/jekyll/rp_logs/rp_tags.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def initialize(name,config={"char_tag_format"=>"none"} )
case (config["char_tag_format"] || "").downcase
when "upcase"; @name = $LAST_MATCH_INFO[:char_name].upcase
when "downcase"; @name = $LAST_MATCH_INFO[:char_name].downcase
when "capitalize_preserve"; @name = $LAST_MATCH_INFO[:char_name].gsub(/([a-zA-Z])[a-zA-Z]*/){|s|s.capitalize}
when "capitalize_preserve"; @name = $LAST_MATCH_INFO[:char_name].gsub(/(?<![a-zA-Z])[a-zA-Z]/){|s|s.capitalize}
when "capitalize"; $LAST_MATCH_INFO[:char_name].gsub(/([a-zA-Z]+)/){|s|s.capitalize}
else @name = $LAST_MATCH_INFO[:char_name]
end
Expand Down

0 comments on commit 853a54c

Please sign in to comment.