-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
Description
Describe the bug
About
PR #11474 introduced changes which are causing leading/trailing whitespaces to be trimmed. I believe that issue is in implementation of fn extract_line_content and exact issue i am encountering caused by invocation on line https://github.com/swc-project/swc/pull/11474/changes#diff-8abacd70370fd7f85bb3452458bd542918f7b0a9dc6074dce36d726593c4efe0R1867
Input code
just `white space` in front of `charCode` in JSX:
<span> • </span>Config
Link to the code that reproduces this issue
SWC Info output
No response
Expected behavior
I expect behavior like in previous version or in babel, preserved leading and trailing space:
Input: <span> • </span>
Output: React.createElement("span", null, " • ");
Actual behavior
Current behaviour is that leading space is trimmed:
Input: <span> • </span>
Output: React.createElement("span", null, "• ");
Version
v1.15.11
Additional context
No response
Reactions are currently unavailable