Closed jakubjo closed 5 years ago
I guess we need to check if the current status is simple-quote
or double-quote
and make a break if so.
Something like this: https://github.com/oscarotero/Gettext/blob/93176b272d61fb58a9767be71c50d19149cb1e48/src/Utils/JsFunctionsScanner.php#L55
Thanks!
We use \n also in single quotes in JS. I believe JS does not require double quotes around new line sequences.
I've submitted a PR. In our case the issue is fixed and everything is working as intended. I'm curious what you'll say.
Thank you for this awesome package!
I've encountered following issue:
When scanning JavaScript files the backslash of new line sequences is stripped.
Results in following msgid:
msgid "First LinenSecond LinenThird Line"
When I remove the case in JsFunctionsScanner:39 extracting is working as intended. https://github.com/oscarotero/Gettext/blob/93176b272d61fb58a9767be71c50d19149cb1e48/src/Utils/JsFunctionsScanner.php#L39
I'd submit a PR, but I'm unsure how to fix this properly and do not really understand all whats happening in JsFunctionsScanner.