html-to-react
Advanced tools
Comparing version 1.2.9 to 1.2.10
# Change Log | ||
## [v1.2.10](https://github.com/aknuds1/html-to-react/tree/v1.2.10) | ||
- Handle background-image styles | ||
[Full Changelog](https://github.com/aknuds1/html-to-react/compare/v1.2.9...v1.2.10) | ||
**Merged pull requests:** | ||
- Handle background-image styles [\#31](https://github.com/aknuds1/html-to-react/pull/31) ([brett-nuske-alliancesoftware](https://github.com/brett-nuske-alliancesoftware)) | ||
## [v1.2.9](https://github.com/aknuds1/html-to-react/tree/v1.2.9) | ||
@@ -4,0 +14,0 @@ |
'use strict'; | ||
var utils = require('./utils'); | ||
// eslint-disable-next-line max-len | ||
// https://github.com/facebook/react/blob/15.0-stable/src/renderers/dom/shared/ReactDOMComponent.js#L457 | ||
@@ -5,0 +6,0 @@ var voidElementTags = [ |
@@ -14,2 +14,6 @@ 'use strict'; | ||
singleStyle = styles[i].split(':'); | ||
if (singleStyle.length > 2) { | ||
singleStyle[1] = singleStyle.slice(1).join(':'); | ||
} | ||
key = camelize(singleStyle[0]); | ||
@@ -16,0 +20,0 @@ value = singleStyle[1]; |
{ | ||
"name": "html-to-react", | ||
"version": "1.2.9", | ||
"version": "1.2.10", | ||
"description": "A lightweight library that converts raw HTML to a React DOM structure.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -34,3 +34,4 @@ 'use strict'; | ||
it('should return a valid HTML string with inline styles', function () { | ||
var htmlInput = '<div style="background-color: red;color: white;' + | ||
var htmlInput = '<div style="background-image: url(' + | ||
'"http://lorempixel.com/400/200/");background-color: red;color: white;' + | ||
'font-family: "Open Sans";"></div>'; | ||
@@ -404,2 +405,3 @@ | ||
'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"></svg>': | ||
// eslint-disable-next-line max-len | ||
/<svg xmlns="http:\/\/www\.w3\.org\/2000\/svg" xmlns:xlink="http:\/\/www\.w3\.org\/1999\/xlink"><\/svg>/, | ||
@@ -406,0 +408,0 @@ }; |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
44917
18
589