From 2a64b24529563c0f84c1169707cd6d30033ab666 Mon Sep 17 00:00:00 2001 From: yosuke ota Date: Mon, 21 Feb 2022 17:37:31 +0900 Subject: [PATCH] Fix wrong handling when CRLF in `\r + `, + { + sourceType: "module", + }, + ) + const script = parsed.services + .getDocumentFragment() + .children.find( + (child) => child.type === "VElement" && child.name === "script", + ) + assert.ok(!script.children[0].value.includes("\r")) + }) + it("should contain CRLF in script comment.", async () => { + const parsed = parser.parseForESLint( + `\r + `, + { + sourceType: "module", + }, + ) + assert.ok(parsed.ast.comments[0].value.includes("\r\n")) + }) +})