Merge pull request #3147 from blbradley/markdown-file-ext-regexp

This commit is contained in:
Parker Moore 2014-11-25 10:20:27 -08:00
commit 37af23b5d7
4 changed files with 9 additions and 2 deletions

View File

@ -48,7 +48,7 @@ module Jekyll
def extname_matches_regexp
@extname_matches_regexp ||= Regexp.new(
'(' + @config['markdown_ext'].gsub(',','|') +')$',
'^\.(' + @config['markdown_ext'].gsub(',','|') +')$',
Regexp::IGNORECASE
)
end

View File

@ -14,7 +14,7 @@ class TestGeneratedSite < Test::Unit::TestCase
end
should "ensure post count is as expected" do
assert_equal 43, @site.posts.size
assert_equal 44, @site.posts.size
end
should "insert site.posts into the index" do

View File

@ -677,6 +677,13 @@ class TestPost < Test::Unit::TestCase
assert conv.kind_of? Jekyll::Converters::Identity
end
should "process .Rmd under text if it is not in the markdown config" do
@site.config['markdown_ext'] = 'markdown,mkd,md,text'
post = setup_post '2014-11-24-Rmd-extension.Rmd'
conv = post.converters.first
assert conv.kind_of? Jekyll::Converters::Identity
end
should "process .text as textile under alternate configuration" do
@site.config['textile_ext'] = 'textile,text'
post = setup_post '2011-04-12-text-extension.text'