Skip to content

Commit

Permalink
Merge branch 'master' into prateekbh/suspense-hydration
Browse files Browse the repository at this point in the history
  • Loading branch information
reznord committed Jan 27, 2020
2 parents eca2cf2 + aca606a commit 8f679f0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion compat/src/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
} from 'preact';
import { applyEventNormalization } from './events';

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|color|fill|flood|font|glyph|horiz|marker|overline|paint|stop|strikethrough|stroke|text|underline|unicode|units|v|vector|vert|word|writing|x)[A-Z]/;

// Some libraries like `react-virtualized` explicitly check for this.
Component.prototype.isReactComponent = {};
Expand Down
16 changes: 16 additions & 0 deletions compat/test/browser/svg.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,20 @@ describe('svg', () => {
)
);
});

it('should render SVG to DOM without name (clipPathUnits) attribute manipulation', () => {
React.render(
<svg>
<clipPath id="hexagon" clipPathUnits="objectBoundingBox">
<polygon points="0.5 0, 1 0.25, 1 0.75, 0.5 1, 0 0.75, 0 0.25" />
</clipPath>
</svg>,
scratch
);
expect(serializeHtml(scratch)).to.eql(
sortAttributes(
'<svg><clipPath id="hexagon" clipPathUnits="objectBoundingBox"><polygon points="0.5 0, 1 0.25, 1 0.75, 0.5 1, 0 0.75, 0 0.25" /></clipPath></svg>'
)
);
});
});

0 comments on commit 8f679f0

Please sign in to comment.