We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 69475a0 commit 9537dc5Copy full SHA for 9537dc5
src/PatternLab/Annotations.php
@@ -94,7 +94,9 @@ public static function gather() {
94
if (file_exists($oldStyleAnnotationsPath)) {
95
$text = file_get_contents($oldStyleAnnotationsPath);
96
$text = str_replace("var comments = ","",$text);
97
- $text = rtrim($text,";");
+ if ($text[strlen($text)-1] == ";") {
98
+ $text = rtrim($text,";");
99
+ }
100
$data = json_decode($text,true);
101
if ($jsonErrorMessage = JSON::hasError()) {
102
JSON::lastErrorMsg(Console::getHumanReadablePath($oldStyleAnnotationsPath),$jsonErrorMessage,$data);
0 commit comments