pugjs / babel-plugin-transform-react-pug

A plugin for transpiling pug templates to jsx

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Spreading attributes from object requires comma

ezhlobo opened this issue · comments

Better to show an example:

Invalid

button(type="button" ...props)

Proof

Valid

button(type="button", ...props)

Proof

Will be nice to have both cases working.

This should just be a case of treating ... as a special case like we do with : in https://github.com/pugjs/pug/blob/2f1110ec2ed8656253331e1e4b1b20b9d12185ee/packages/pug-lexer/index.js#L1221

@ForbesLindesay thank you, that helped! Created pull request to pug-lexer:

pugjs/pug#3152

Fixed in v7.0.1