Repository navigation
refactor(formatter): resolve JSX comment ownership before printing - #1758
magic-akari wants to merge 1 commit into
Conversation
…ission Resolve tag punctuation, attribute protection and await brace layout from complete source ranges. Emit only the comments that the selected tag or operand still owns.
Deploying swc-next with
|
| Latest commit: |
92bcc5f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://8720f536.swc-next.pages.dev |
| Branch Preview URL: | https://refactor-formatter-jsx-sourc.swc-next.pages.dev |
Binary size diffLinux x64 GNU · release · uncompressed, stripped bindings. Merge:
|
JavaScript API Gungraun benchmark diffBase: Values are shown as Download the raw Gungraun and Valgrind data (retained for 90 days). Callgrind metric changesMedian instruction counts from three processes, shown as compare / base in K (1,000), truncated to whole thousands. Percentages are rounded to at most three decimal places. Lower is better: 🟢 improvement, 🔴 regression, ⚪ unchanged or overlapping ranges (inconclusive). JIT disabled (--jitless); predictable mode enabled (--predictable). Counts are not wall time. Exact counts, ranges and profiles are retained in artifacts. Generate
Lang
Parse
Source type
Walk
Benchmark resultsExact instruction counts: median (min–max).
|
Gungraun benchmark diffBase SHA: 8f5523f Values are shown as Download the raw Gungraun and Valgrind data (retained for 90 days). Callgrind metric changesCallgrind instruction counts (Ir) for the compare and base revisions. Values are shown as compare / base in K (1,000), truncated to whole thousands. Multi-part profiles use the part numbers from Gungraun and include an aggregated Total. New and Removed identify benchmarks that exist on only one side; the missing value is shown as a dash. Percentages are rounded to at most three decimal places. Lower is better: 🟢 improvement, 🔴 regression, ⚪ unchanged. Formatter
Generator
Minifier
Parser
Semantic
Transform
Type strip
Visit
Benchmark results |
Motivation
Comments around JSX tags and expression containers can determine which attribute
prettier-ignoreprotects and how the expression fits inside its braces. Those decisions need to survive earlier comment claims.Changes
=from the original source, skipping matching characters inside comments.prettier-ignoreprotects before claiming comments.awaitoperands.