indentRange indent exception in object

I implement indent according to the documentation
This is the way I use:

    changes: indentRange(view.state, from, to),

The following situation will occur, and the indentation of the attributes in the simple formatting object will be abnormal. The whole object is ok。Seems to be an issue with the indentRange method calculation?

this is my text i have in both js and jsx
state= {
text: [],

If the {/*...*/} text is part of the document, I guess that is causing this. It’s not valid JavaScript to have a {} pair in an object like that, so it’ll throw off the parse.

Thank you for your ideas, praise for you

Hi,marijn. In the tsx file, the representation of the comment is wrong。I checked the @codemirror/lang-javascript package and didn’t see {/**/}。Can I know what the comment on a certain line is?

This is normal for vscode:

Can you be a bit more clear about what syntax you’re referring to (the screenshots show different things) and what you expect to happen? I’m pretty sure that inside a JSX tag, slashes are just document text.