Skip to content

Commit

Permalink
Case-insensitive on just markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
bkeepers committed Sep 11, 2014
1 parent 1c1c086 commit 4731953
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ gem "creole", "~>0.3.6"
gem "wikicloth", "=0.8.1"
gem "asciidoctor", "= 0.1.4"
gem "rake"
gem "pry"
2 changes: 1 addition & 1 deletion lib/github-markup.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module GitHub
module Markup
VERSION = '1.2.1'
VERSION = '1.2.1.rmd'
Version = VERSION
end
end
2 changes: 1 addition & 1 deletion lib/github/markup/implementation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def match?(filename)

private
def file_ext_regexp
@file_ext_regexp ||= /\.(#{regexp})\z/i
@file_ext_regexp ||= /\.(#{regexp})\z/
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/github/markup/markdown.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Markdown < Implementation
}

def initialize
super(/md|rmd|mkdn?|mdwn|mdown|markdown|litcoffee/)
super(/md|rmd|mkdn?|mdwn|mdown|markdown|litcoffee/i)
end

def load
Expand Down
2 changes: 2 additions & 0 deletions test/markup_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ 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 true, GitHub::Markup.can_render?('README.rmd')
require 'pry'
binding.pry
assert_equal true, GitHub::Markup.can_render?('README.Rmd')
assert_equal false, GitHub::Markup.can_render?('README.cmd')
assert_equal true, GitHub::Markup.can_render?('README.litcoffee')
Expand Down

0 comments on commit 4731953

Please sign in to comment.