Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
use re
  • Loading branch information
ralsina committed May 20, 2015
1 parent fec948f commit 248af57
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nikola/plugins/command/auto/auto.py
Expand Up @@ -29,6 +29,7 @@
import json
import mimetypes
import os
import re
import subprocess
try:
from urlparse import urlparse
Expand Down Expand Up @@ -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


Expand Down

0 comments on commit 248af57

Please sign in to comment.