diff --git a/src/Generator.php b/src/Generator.php
index 440df55..7e76a82 100644
--- a/src/Generator.php
+++ b/src/Generator.php
@@ -80,7 +80,7 @@ private function adjustString($s)
}
return preg_replace_callback(
- '/:\w*/',
+ '/(<[^>]*>(*SKIP)(*FAIL)|:\w*)/',
function ($matches) {
return '{' . mb_substr($matches[0], 1) . '}';
},
diff --git a/tests/GenerateTest.php b/tests/GenerateTest.php
index 6a9366b..d2fa62b 100644
--- a/tests/GenerateTest.php
+++ b/tests/GenerateTest.php
@@ -119,7 +119,7 @@ function testNamed()
$this->destroyLocaleFilesFrom($arr, $root);
}
- function testLeaveHtmlTags()
+ function testShouldNotTouchHtmlTags()
{
$arr = [
'en' => [
@@ -135,7 +135,7 @@ function testLeaveHtmlTags()
'export default {' . PHP_EOL
. ' "en": {' . PHP_EOL
. ' "help": {' . PHP_EOL
- . ' "yes": "see ",' . PHP_EOL
+ . ' "yes": "see "' . PHP_EOL
. ' }' . PHP_EOL
. ' }' . PHP_EOL
. '}' . PHP_EOL,