From 1e2f46186249ad99235f1b6dbaf07e3cf3c4f8cc Mon Sep 17 00:00:00 2001 From: Ali Ariff Date: Sat, 24 Aug 2024 16:35:15 +0200 Subject: [PATCH] reuse isWindows method --- src/formatter/htmlbeautifier.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/formatter/htmlbeautifier.ts b/src/formatter/htmlbeautifier.ts index f0bf9a8..cda7c21 100644 --- a/src/formatter/htmlbeautifier.ts +++ b/src/formatter/htmlbeautifier.ts @@ -194,7 +194,7 @@ export default class HtmlBeautifier { // Set the newline character(s) based on the 'files.eol' setting and the platform let newline = eol; if (eol === "auto") { - newline = process.platform === "win32" ? "\r\n" : "\n"; + newline = this.isWindows() ? "\r\n" : "\n"; } // Append the newline to the result