Skip to content
Permalink
Browse files

use re

  • Loading branch information
ralsina committed May 20, 2015
1 parent fec948f commit 248af57b54bc8d7d923caedde69b10b6d9c96c4e
Showing with 2 additions and 2 deletions.
  1. +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


0 comments on commit 248af57

Please sign in to comment.