fix(styled-components): strip line comments after multiline declarations#618
fix(styled-components): strip line comments after multiline declarations#618kdy1 wants to merge 1 commit into
Conversation
|
Code ReviewReviewed the change in CorrectnessThe fix is sound.
The symmetric case is preserved: a line with a still-open Possible side-effect to flagThe relaxation is asymmetric: lines with more
This also intentionally diverges from the upstream babel-plugin-styled-components ( Test coverage
Other notes
Overall: clean fix with appropriate coverage. Optional improvements: an inline comment explaining the |
Summary
//comments after multiline declarations are stripped when the line starts with closing parens.//handling.Fixes #615.
Validation
cargo test -p styled_components --libcargo test -p styled_components --test fixture issue_615 -- --include-ignoredpnpm exec vitest run --testTimeout=0cargo fmt -p styled_components --check