less-than-slash icon indicating copy to clipboard operation
less-than-slash copied to clipboard

Support JSX spread property syntax

Open MarcPorciuncula opened this issue 7 years ago • 2 comments

In jsx you can use the spread property syntax {...object} in place of a property-value pair in a tag. less-than-slash was skipping any tags that had this.

This adds support in the xml parser.

I'm getting concerned that maybe our regex is getting too complicated, but I don't know if it's actually causing any performance issues so it should be okay for now (Maybe JSX should get its own parser? Add a JSX option to the settings?). I changed the xmlparser test so that it checks that there is a (potential) whole tag before executing the more complex regex in the parse function. Not sure how much benefit this is.

@mrhanlon review?

MarcPorciuncula avatar Dec 03 '16 23:12 MarcPorciuncula