Closed jesstelford closed 8 years ago
Note that I tried the same case in htmltojsx
, and it gives the correct output:
var HTMLtoJSX = require('htmltojsx');
var converter = new HTMLtoJSX({
createClass: false
});
console.log(converter.convert('<div data-component="Component" style="padding:0; display:inline; margin: 10; border: none"></div>'));
Produces
<div data-component="Component" style={{padding: 0, display: 'inline', margin: 10, border: 'none'}} />
Does this imply an issue with the output formatter?
Interesting. I'm going to check this. Thanks!
fixed in 1ecc6998
:+1: Thanks!
On commit 775e9b12064e0dcae0f1eef9d5fa21c0ff461700
This minimal test case:
Produces this output:
Notice the
padding: 0
line is missing a trailing comma.When more than two inline style elements exist, commas are correctly inserted for properties other than the first. For example:
Produces