     return tmp.replace('.html', '').replace('.haml', '').replace('.', '-')
 
   replaceExtension: (path) ->
-    path = path.replace('.html','').replace('.haml')
-    path = path + '.' + @config.compiler.extension
+    path = path.replace('.html', '').replace('.haml', '')
+    path = path + @config.compiler.extension
     path.replace('..', '.')
 
   compileTemplate: (file, cb) =>


  renderFile: (file, locals) =>
    unless fs.existsSync(file)
      throw new PluginError('EWGHamlRenderer', 'File not found '
                              + file.yellow , showStack: true)

    content = fs.readFileSync(file, 'utf8')
    @renderContent(content, extend(true, @lastContext, locals), file)

      output = hamlc.render(content, context, @config.compiler)
    catch e
      file = content unless file
      throw new PluginError('EWGHamlRenderer', 'Error compiling ' + file.yellow + ': ' + e, showStack: true)
    output

  renderPartial: (file, locals)=>
