JavaScript file parsing error in v8.9

Hi,
We are currently using SonarQube v7.5 and plan to upgrade to v8.9 LTS.
We have a JavaScript file that is being parsed and analyzed successfully in v7.5. However, when the same file is scanned in v8.9, it fails with a parsing error.
Can someone please help?

v7.5 analysis

v8.9 parsing error

v8.9 analysis

Here is the js file that fails in parsing
testfile.js.txt (244 Bytes)

Thank you!

Hi @Sapan ,

Welcome to SonarSource community! :sonarsource:

I was not able to replicate your parsing error:

From MDN’s documentation on this syntax error, they suggest other ways to get around this problem like adding backslash () character to each line or just remove those unnecessary spaces like so:

            $('body').append(' + this.t + ');

Is there a reason you need such large empty spaces in the append() function?

Thank you for your response, @Joe.

There isn’t a specific need from our end to have the empty spaces. Actually, this is an old code and not newly introduced.
The problem we have is that if v8.9 fails to parse these kind of files (which were being parsed successfully in v7.5), it will increase a lot of overhead for us as there are multiple projects and thousands of files. It will mean that we have to compare the scan logs for v7.5 and v8.9 for all the projects that we have and then fix any such files that we find.