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= {
list:‘’,
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.
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?
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.
hi,marijn。 I debugged the source code of indentRange and found that the output result was incorrect, as shown in 17-19, the result should be 4 to be correct, but it calculated 2。