diff --git a/template.js b/template.js
index abede1bcb..75aac6a1a 100644
--- a/template.js
+++ b/template.js
@@ -10,9 +10,9 @@ import templateSettings from './templateSettings.js'
import toString from './toString.js'
/** Used to match empty string literals in compiled template source. */
-const reEmptyStringLeading = /\b__p \+= ''g
+const reEmptyStringLeading = /\b__p \+= '';/g
const reEmptyStringMiddle = /\b(__p \+=) '' \+/g
-const reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n''g
+const reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g
/**
* Used to match
@@ -81,7 +81,7 @@ const stringEscapes = {
* // Use the HTML "escape" delimiter to escape data property values.
* let compiled = template('<%- value %>')
* compiled({ 'value': '