fix: strip leading empty lines in sanitizeUserFacingText (#16280)

* fix: strip leading empty lines in sanitizeUserFacingText (#16158) (thanks @mcinteerj)

* fix: strip leading empty lines in sanitizeUserFacingText (#16158) (thanks @mcinteerj)

* fix: strip leading empty lines in sanitizeUserFacingText (#16158) (thanks @mcinteerj)
This commit is contained in:
Peter Steinberger
2026-02-14 16:34:02 +01:00
committed by GitHub
parent aa1dbd34a1
commit 50a6e0e69e
3 changed files with 6 additions and 3 deletions

View File

@@ -77,7 +77,7 @@ describe("sanitizeUserFacingText", () => {
});
it("strips leading whitespace and newlines combined", () => {
expect(sanitizeUserFacingText("\n \n Hello")).toBe("Hello");
expect(sanitizeUserFacingText("\n \nHello")).toBe("Hello");
expect(sanitizeUserFacingText(" \n\nHello")).toBe("Hello");
});