Skip to content

Commit

Permalink
fix #1403 -- make PHP files in files/ work
Browse files Browse the repository at this point in the history
Signed-off-by: Chris “Kwpolska” Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Sep 8, 2014
1 parent 30bbdc1 commit 13980e0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Features
Bugfixes
--------

* Fix files/\*.php (skip post/story-specific filters) (Issue #1403)
* Warn about missing / in BASE_URL differently (explicit request to
fix the config file)

Expand Down
5 changes: 3 additions & 2 deletions nikola/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,5 +179,6 @@ def php_template_injection(data):
_META_SEPARATOR = '(' + os.linesep * 2 + '|' + ('\n' * 2) + '|' + ("\r\n" * 2) + ')'
phpdata = re.split(_META_SEPARATOR, phpdata, maxsplit=1)[-1]
phpdata = re.sub(template.group(0), phpdata, data)

return phpdata
return phpdata
else:
return data

0 comments on commit 13980e0

Please sign in to comment.