Merge pull request #10629 from scmmishra/router-source-fix

This commit is contained in:
Shivam Mishra 2020-06-09 13:44:51 +00:00 committed by GitHub
commit 2be2c1b627
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -278,10 +278,10 @@ def setup_source(page_info):
if not page_info.base_template:
page_info.base_template = get_base_template(page_info.route)
if page_info.template.endswith('.html') or page_info.template.endswith('.md'):
if page_info.template.endswith(('.html', '.md', )) and \
'{%- extends' not in source and '{% extends' not in source:
# set the source only if it contains raw content
if '{%- extends' not in source and '{% extends' not in source:
html = source
html = source
# load css/js files
js, css = '', ''