From 4a67b6f03b97b5cfffc2d01b72761dc76649a4d2 Mon Sep 17 00:00:00 2001 From: Yang Su Date: Thu, 18 Apr 2019 00:17:01 -0700 Subject: [PATCH] Improved multiline closure comment detection Fixes https://github.com/prettier/prettier/issues/6067 --- CHANGELOG.unreleased.md | 36 +++++++++++++++++++ src/language-js/needs-parens.js | 11 ++++-- .../__snapshots__/jsfmt.spec.js.snap | 16 +++++++++ .../closure-compiler-type-cast.js | 8 +++++ 4 files changed, 68 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.unreleased.md b/CHANGELOG.unreleased.md index 40ef23defba1..87fbc3b1022f 100644 --- a/CHANGELOG.unreleased.md +++ b/CHANGELOG.unreleased.md @@ -151,4 +151,40 @@ Examples: {{/if}} e {{/if}} + + +- JavaScript: Improved multiline closure compiler typecast comment detection ([#6070] by [@yangsu]) + + Previously, multiline closure compiler typecast comments with lines that + start with \* weren't flagged correctly and the subsequent parenthesis were + stripped. Prettier master fixes this issue. + +