aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorBrandon Mathis <brandon@imathis.com>2011-09-29 14:53:45 -0500
committerBrandon Mathis <brandon@imathis.com>2011-09-29 14:53:45 -0500
commit30d5bfca9ced5f9a5ac6a8d2c8117cf8cbafe30a (patch)
tree99c676f6128f97d7af1a52c07ccae1bd97222802 /plugins
parentb19e7698f671ee9cde9c1015b77a7555ecfadbd1 (diff)
parenta35c7806165a0e9ea04883480a91a8851a5751a9 (diff)
downloadmy_new_personal_website-30d5bfca9ced5f9a5ac6a8d2c8117cf8cbafe30a.tar.xz
my_new_personal_website-30d5bfca9ced5f9a5ac6a8d2c8117cf8cbafe30a.zip
Merge branch 'master' of github.com:imathis/octopress
Diffstat (limited to 'plugins')
-rw-r--r--plugins/titlecase.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/titlecase.rb b/plugins/titlecase.rb
index 103bf702..3ad39b1f 100644
--- a/plugins/titlecase.rb
+++ b/plugins/titlecase.rb
@@ -11,8 +11,8 @@ class String
# capitalize first and last words
x.first.to_s.smart_capitalize!
x.last.to_s.smart_capitalize!
- # small words after colons are capitalized
- x.join(" ").gsub(/:\s?(\W*#{small_words.join("|")}\W*)\s/) { ": #{$1.smart_capitalize} " }
+ # small words after colons or periods are capitalized
+ x.join(" ").gsub(/(:|\.)\s?(\W*#{small_words.join("|")}\W*)\s/) { "#{$1} #{$2.smart_capitalize} " }
end
def titlecase!