Closed pravynandas closed 3 years ago
Applied a fix to join any two consecutive STRING types into one STRING. Result is positive.
Will create a PR in a moment.
I'll have a look into it.
The problem is the double quotes ""
in vbscript means an escaped quote like \"
in other languages; therefore, it shouldn't even be parsed in a separate string but on single string.
Dim test : test = "double quotes ("") is an escaped quote in vbscript"
I'll provide a fix.
Done, latest commit addresses this issue. Can you confirm it's working on your tests?
Fix working great. Thanks.
I closed the PR I created, since is no more needed. For now published new version on @vbsnext/vbs-pretty at npmjs. But as soon as your primary package available, I will start using it.
@pravynandas There it goes https://www.npmjs.com/package/vbspretty
Awesome @lenilsondc . I used the package and is working great. @vbsnext/vbs-pretty is now obsolete and is deleted.
'======= Example 1 ============= buf.Add buf.Count, """"
Now became
buf.Add buf.Count, "" "" '======= Example 2 ============= Case """"
became
Case "" "" '======= Example 3 ============= Set StringChunk = New RegExp StringChunk.Pattern = "([\s\S]*?)([""\\x00-\x1f])"
became
Set StringChunk = New RegExp StringChunk.Pattern = "([\s\S]*?)([" "\\x00-\x1f])"