Commit ff446f5c authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Fix {local_storage_db} replacement in template.html.

Bad regex caused {local_storage_db} to be left unreplaced.
It managed to match "{localStorageDb: {local_storage_db}" for
which it didn't find any replacement.

Now with stricter regex such errors should be no more.
parent a89c06a3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -272,7 +272,7 @@ module JsDuck
      out_file = @opts.output_dir + '/' + filename
      Logger.instance.log("Creating #{out_file}...")
      html = IO.read(in_file)
      html.gsub!(/\{.*?\}/) do |key|
      html.gsub!(/\{\w+\}/) do |key|
        replacements[key] ? replacements[key] : key
      end
      FileUtils.rm(out_file)