Skip to content

Commit

Permalink
refactor: use regular expression instead of replaceAll()
Browse files Browse the repository at this point in the history
  • Loading branch information
Maizify committed Jul 21, 2022
1 parent 59b8c08 commit f3aaff5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/log/logValue.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
if (!isInTree && valueType === 'string') {
// convert string
dataValue = tool.htmlEncode(dataValue.replaceAll('\\n', '\n').replaceAll('\\t', ' '));
dataValue = tool.htmlEncode(dataValue.replace(/\\n/g, '\n').replace(/\\t/g, ' '));
}
// (window as any)._vcOrigConsole.log('logValue update', origData);
Expand Down

0 comments on commit f3aaff5

Please sign in to comment.