Skip to content
This repository has been archived by the owner on Oct 28, 2023. It is now read-only.

Commit

Permalink
* fix(TokenReader.cs): change encoding from ASCII to UTF-8 for codeRe…
Browse files Browse the repository at this point in the history
…ader

* chore(TokenReader.cs): update copyright message format
  • Loading branch information
Leo CH Li committed Oct 3, 2023
1 parent 7c64ad2 commit f7572d6
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions VBScriptParseLib/TokenReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -979,12 +979,11 @@ public void LoadStats()
public string FormatCode(string code)
{
ResetVariables();
var codeReader = new PeekableTextReader(new StreamReader(new MemoryStream(Encoding.ASCII.GetBytes(code))));
string copyrightMessage = @"'This source code has been formatted with Free VBScript Source Code Formatter
'Tool by Tarun Automation Research & Labs Pvt. Ltd (TARLABS™) - http://www.tarlabs.com
'The code formatter is maintained by Leo and can be found at this GitHub link: https://github.com/leoli0605/vbscript-code-formatter.
";
var codeReader = new PeekableTextReader(new StreamReader(new MemoryStream(Encoding.UTF8.GetBytes(code))));
string copyrightMessage = "'This source code has been formatted with Free VBScript Source Code Formatter" + "\r\n" +
"'Tool by Tarun Automation Research & Labs Pvt. Ltd (TARLABS™) - http://www.tarlabs.com" + "\r\n" +
"'The code formatter is maintained by Leo and can be found at this GitHub link: https://github.com/leoli0605/vbscript-code-formatter" + "\r\n" +
"\r\n";

ParseStage1(codeReader);
ParseStage2();
Expand Down

0 comments on commit f7572d6

Please sign in to comment.