Skip to content

Commit d2bd13b

Browse files
committed
fixed function closing in jsCode #122
1 parent 35c91fd commit d2bd13b

3 files changed

Lines changed: 2 additions & 5 deletions

File tree

src/Utils/JsFunctionsScanner.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ public function getFunctions()
130130
$functions[] = array_shift($bufferFunctions);
131131
}
132132

133+
$this->upStatus();
133134
$buffer = '';
134135
continue 3;
135136
}
@@ -169,8 +170,6 @@ public function getFunctions()
169170
}
170171
}
171172

172-
var_dump($functions);
173-
174173
return $functions;
175174
}
176175

tests/AssetsTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@ public function testJs2Code()
213213
$translations = static::get('jscode2/input', 'JsCode');
214214
$countTranslations = 3;
215215
$countHeaders = 8;
216-
return;
217216

218217
$this->assertCount($countTranslations, $translations);
219218
$this->assertCount($countHeaders, $translations->getHeaders());

tests/assets/jscode2/input.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
/*
21
gettext("some message");
32
pgettext("some context", "some message in a context");
43
ngettext("%s message", "%s messages", 2);
5-
*/
4+
65
(function(){
76
var foo = ["string1", "string2", "string3"];
87
})();

0 commit comments

Comments
 (0)