From 111f76b2fd1da3e5603eeb80dbafe9dabecb248a Mon Sep 17 00:00:00 2001 From: Chris Van Pelt Date: Sun, 23 Nov 2008 23:38:43 -0800 Subject: [PATCH] Nice little word count --- lib/jekyll/filters.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/jekyll/filters.rb b/lib/jekyll/filters.rb index b0a20eca..58191ec7 100644 --- a/lib/jekyll/filters.rb +++ b/lib/jekyll/filters.rb @@ -12,6 +12,10 @@ module Jekyll def xml_escape(input) input.gsub("<", "<").gsub(">", ">") end + + def number_of_words(input) + input.split.length + end end end \ No newline at end of file