Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
with
2 additions
and
2 deletions.
-
+2
−2
nikola/plugins/command/auto/auto.py
|
@@ -29,6 +29,7 @@ |
|
|
import json |
|
|
import mimetypes |
|
|
import os |
|
|
import re |
|
|
import subprocess |
|
|
try: |
|
|
from urlparse import urlparse |
|
@@ -220,8 +221,7 @@ def serve_static(self, environ, start_response): |
|
|
def inject_js(self, mimetype, data): |
|
|
"""Inject livereload.js in HTML files.""" |
|
|
if mimetype == 'text/html': |
|
|
# FIXME: use re.IGNORECASE |
|
|
data = data.replace('</head>', self.snippet, 1) |
|
|
data = re.sub('</head>', self.snippet, data, 1, re.IGNORECASE) |
|
|
return data |
|
|
|
|
|
|
|
|
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.