这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@figsoda
Copy link
Contributor

@figsoda figsoda commented Dec 6, 2022

I am not entirely sure about the extra spaces, but I'm not sure if there is a better way of dealing with this either

Copy link
Owner

@oxalica oxalica left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not entirely sure about the extra spaces, but I'm not sure if there is a better way of dealing with this either

For this specific Assist, you could right-extend the delete span into SPACE (not COMMENT) by checking node.last_token()?.next_token(). Note that it cannot be left-extend, considering let inherit;in 1.

{
  a = 1;
  /*inherit;
  */b = 2;
}

=>

{
  a = 1;
  b = 2;
}
let /*inherit; */in 1

=>

let in 1

@oxalica oxalica merged commit 661af99 into oxalica:main Dec 7, 2022
@figsoda figsoda deleted the remove-empty branch December 7, 2022 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants