Permalink
Browse files

there may be many backreferences

  • Loading branch information...
1 parent 5f1ec2c commit 1cfbac62a21322b0590adf70049b9158d11ff7c2 @marcuswestin committed Mar 22, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 compiler.js
View
@@ -60,7 +60,7 @@ function compileHTMLFile(filePath, opts) {
var js = compileFile(match[1].toString(), opts)
var BACKREFERENCE_WORKAROUND = '____________backreference_workaround________'
- js = js.replace('\$\&', BACKREFERENCE_WORKAROUND)
+ js = js.replace(/\$\&/g, BACKREFERENCE_WORKAROUND)
html = html.replace(match[0], '<script>'+js+'</script>')
html = html.replace(BACKREFERENCE_WORKAROUND, '\$\&')
}

0 comments on commit 1cfbac6

Please sign in to comment.