diff --git a/lib/replacer.js b/lib/replacer.js index 6fa914c..cdad84c 100644 --- a/lib/replacer.js +++ b/lib/replacer.js @@ -1,5 +1,7 @@ module.exports = function (cow, variables) { var eyes = escapeRe(variables.eyes); + var eyeL = eyes.charAt(0); + var eyeR = eyes.charAt(1); var tongue = escapeRe(variables.tongue); if (cow.indexOf("$the_cow") !== -1) { @@ -11,6 +13,8 @@ module.exports = function (cow, variables) { .replace(/\$eyes/g, eyes) .replace(/\$tongue/g, tongue) .replace(/\$\{eyes\}/g, eyes) + .replace(/\$eye/, eyeL) + .replace(/\$eye/, eyeR) .replace(/\$\{tongue\}/g, tongue) ; };