the import build_parent_template regex was missing nested layouts. Test theme has two new pages to test this.
This commit is contained in:
parent
97e3ddb6e3
commit
9145540ef0
@ -91,13 +91,10 @@ module Locomotive
|
||||
|
||||
def build_parent_template(template)
|
||||
# just check if the template contains the extends keyword
|
||||
fullpath = template.scan(/\{% extends (\w+) %\}/).flatten.first
|
||||
fullpath = template.scan(/\{%\s*extends\s*\'([^\']+)\'\s*%\}/).flatten.first
|
||||
|
||||
if fullpath # inheritance detected
|
||||
fullpath.gsub!("'", '')
|
||||
|
||||
return if fullpath == 'parent'
|
||||
|
||||
self.add_page(fullpath)
|
||||
end
|
||||
end
|
||||
|
BIN
spec/fixtures/themes/default.zip
vendored
BIN
spec/fixtures/themes/default.zip
vendored
Binary file not shown.
@ -53,7 +53,7 @@ describe Locomotive::Import::Job do
|
||||
end
|
||||
|
||||
it 'inserts all the pages' do
|
||||
@site.pages.count.should == 9
|
||||
@site.pages.count.should == 11
|
||||
end
|
||||
|
||||
it 'inserts the index and 404 pages' do
|
||||
|
Loading…
Reference in New Issue
Block a user