Browse Source

Remove extra spaces in the style attribute to better match React

master
Vitaliy Filippov 11 months ago
parent
commit
85a396fb9c
  1. 3
      renderToHtml.js

3
renderToHtml.js

@ -33,7 +33,6 @@ const boolAttrs = {
multiple: true,
required: true,
reversed: true,
selected: true,
};
function renderToHtml(tree)
@ -75,7 +74,7 @@ function renderToHtml(tree)
}
else if (k == 'style' && v instanceof Object)
{
v = Object.keys(v).map(sk => sk.replace(/[A-Z]/g, m => '-'+m.toLowerCase())+': '+v[sk]).join('; ');
v = Object.keys(v).map(sk => sk.replace(/[A-Z]/g, m => '-'+m.toLowerCase())+':'+v[sk]).join(';');
}
else if (k == 'value' && tag == 'textarea')
{

Loading…
Cancel
Save