all repos — markup @ f06a4884faa3da768b621c926ec69e8cb5785418

The code we use to render README.your_favorite_markup

Bugfix: actually check file extensions
Chris Wanstrath chris@ozmm.org
Mon, 02 Nov 2009 17:35:39 -0800
commit

f06a4884faa3da768b621c926ec69e8cb5785418

parent

5faa5672dff6ffb4f87c575a06e0e3acaf888469

2 files changed, 2 insertions(+), 1 deletions(-)

jump to
M lib/github/markup.rblib/github/markup.rb

@@ -46,7 +46,7 @@ end

def renderer(filename) @@markups.each do |key, value| - if Regexp.compile("(#{key})$") =~ filename + if Regexp.compile("\\.(#{key})$") =~ filename return value end end
M test/markup_test.rbtest/markup_test.rb

@@ -24,5 +24,6 @@

def test_knows_what_it_can_and_cannot_render assert_equal false, GitHub::Markup.can_render?('README.html') assert_equal true, GitHub::Markup.can_render?('README.markdown') + assert_equal false, GitHub::Markup.can_render?('README.cmd') end end