lib/mangos/pages_deflater.rb in mangos-0.1 vs lib/mangos/pages_deflater.rb in mangos-0.2
- old
+ new
@@ -9,10 +9,11 @@
last_count = 0
out = []
@page_paths.each do |path|
- base, ext = path.split(".")
+ path_parts = path.rpartition(".")
+ base, ext = path_parts.first, path_parts.last
if last_base.nil? || (ext != last_ext) || (base != last_base.succ)
if last_count > 0
out.last.replace("#{out.last}/#{last_count}")
last_count = 0
\ No newline at end of file