Permalink
Browse files

Merge remote branch 'lpenz/master'

Conflicts:
	History.txt
  • Loading branch information...
mojombo committed Nov 17, 2010
2 parents accdb2d + b1049c8 commit c1a7662311171f5ac510257a2419d4fe00ff7711
Showing with 20 additions and 1 deletion.
  1. +2 −0 History.txt
  2. +1 −1 lib/jekyll/page.rb
  3. +7 −0 test/source/deal.with.dots.html
  4. +10 −0 test/test_page.rb
View
@@ -1,6 +1,8 @@
== HEAD
* Minor Enhancements
* Add wordpress.com importer (#207)
+ * Bug Fixes
+ * Fixed filename basename generation (#208)
== 0.7.0 / 2010-08-24
* Minor Enhancements
View
@@ -71,7 +71,7 @@ def url
# Returns nothing
def process(name)
self.ext = File.extname(name)
- self.basename = name.split('.')[0..-2].first
+ self.basename = name[0 .. -self.ext.length-1]
end
# Add any necessary layouts to this post
@@ -0,0 +1,7 @@
+---
+title: Deal with dots
+permalink: /deal.with.dots/
+---
+
+Let's test if jekyll deals properly with dots.
+
View
@@ -23,6 +23,16 @@ def do_render(page)
assert_equal "/contacts.html", @page.url
end
+ should "deal properly with extensions" do
+ @page = setup_page('deal.with.dots.html')
+ assert_equal ".html", @page.ext
+ end
+
+ should "deal properly with dots" do
+ @page = setup_page('deal.with.dots.html')
+ assert_equal "deal.with.dots", @page.basename
+ end
+
context "with pretty url style" do
setup do
@site.permalink_style = :pretty

0 comments on commit c1a7662

Please sign in to comment.