diff --git a/src/index.js b/src/index.js index a47feb1..15fe1f8 100644 --- a/src/index.js +++ b/src/index.js @@ -24,8 +24,7 @@ const AUTOBIND_BLACKLIST = { }; -const CAMEL_PROPS = /^(?:accent|alignment|arabic|baseline|cap|clip|color|fill|flood|font|glyph|horiz|marker|overline|paint|stop|strikethrough|stroke|text|underline|unicode|units|v|vector|vert|word|writing|x)[A-Z]/; - +const CAMEL_PROPS = /^(?:accent|alignment|arabic|baseline|cap|clip(?!(PathUnits)$)|color|fill|flood|font|glyph(?!(Ref)$)|horiz|marker(?!(Height|Units|Width)$)|overline|paint|stop|strikethrough|stroke|text(?!(Length)$)|underline|unicode|units|v|vector|vert|word|writing|x(?!(ChannelSelector)$))[A-Z]/; const BYPASS_HOOK = {}; diff --git a/test/svg.js b/test/svg.js index 7d85b5b..41ce986 100644 --- a/test/svg.js +++ b/test/svg.js @@ -50,4 +50,54 @@ describe('svg', () => { expect(scratch.innerHTML).to.equal('foo'); }); + + it("should render SVG to DOM with camelCased textLength", () => { + React.render( + + + foo + + , + scratch + ); + + expect(scratch.innerHTML).to.equal( + 'foo' + ); + }); + + it("should render SVG to DOM with camelCased clipPathUnits", () => { + React.render( + + + , + scratch + ); + + expect(scratch.innerHTML).to.equal( + '' + ); + }); + + it("should render SVG to DOM with camelCased marker attributes", () => { + React.render( + + + , + scratch + ); + + expect(scratch.innerHTML).to.equal( + '' + ); + }); });