Skip to content

Commit

Permalink
Fix #2706 -- fix PHP posts/pages not rendering on Windows
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Mar 28, 2017
1 parent bc568c9 commit 7a689fe
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions CHANGES.txt
@@ -1,3 +1,14 @@
New in master
=============

Features
--------

Bugfixes
--------

* Fix PHP posts/pages not rendering on Windows (Issue #2706)

New in v7.8.4
=============

Expand Down
2 changes: 1 addition & 1 deletion nikola/filters.py
Expand Up @@ -328,7 +328,7 @@ def php_template_injection(data):
phpdata = in_file.read()
_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)
phpdata = data.replace(template.group(0), phpdata)
return phpdata
else:
return data
Expand Down

0 comments on commit 7a689fe

Please sign in to comment.