Skip to content

Commit

Permalink
Make tests pass with React 16
Browse files Browse the repository at this point in the history
Changes are cosmetic:
- React 16 no longer adds a trailing `;` to `style` attributes
- React 16 outputs `0` and not `0px` for sizes in `style`
  • Loading branch information
renchap committed Oct 13, 2017
1 parent 9dcec47 commit a8b5ca5
Show file tree
Hide file tree
Showing 15 changed files with 23 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const state = (
export const output = `
<div data-slate-editor="true" contenteditable="true" role="textbox">
<div data-slate-void="true">
<span style="display:inline-block;vertical-align:top;width:0px;height:0px;color:transparent;">
<span style="display:inline-block;vertical-align:top;width:0;height:0;color:transparent">
<span>
<span data-slate-zero-width="true">&#x200A;</span>
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ export const state = (

export const output = `
<div data-slate-editor="true" contenteditable="true" role="textbox">
<div style="position:relative;">
<div style="position:relative">
<span>
<span>o</span>
<span><span style="font-weight:bold;">n</span></span>
<span><span style="font-weight:bold">n</span></span>
<span>e</span>
</span>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const state = (

export const output = `
<div data-slate-editor="true" contenteditable="true" role="textbox">
<div style="position:relative;">
<div style="position:relative">
<span>
<span>
<span data-slate-zero-width="true">&#x200A;</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ export const state = (

export const output = `
<div data-slate-editor="true" contenteditable="true" role="textbox">
<div style="position:relative;">
<div style="position:relative">
<span>
<span>
<span data-slate-zero-width="true">&#x200A;</span>
</span>
</span>
<span data-slate-void="true">
<span style="color:transparent;">
<span style="color:transparent">
<span>
<span data-slate-zero-width="true">&#x200A;</span>
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const state = (

export const output = `
<div data-slate-editor="true" contenteditable="true" role="textbox">
<div style="position:relative;">
<div style="position:relative">
<span>
<span>
<span data-slate-zero-width="true">&#x200A;</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const state = (

export const output = `
<div data-slate-editor="true" contenteditable="true" role="textbox">
<div style="position:relative;">
<div style="position:relative">
<span>
<span>one</span>
<span><strong>two</strong></span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const state = (

export const output = `
<div data-slate-editor="true" contenteditable="true" role="textbox">
<div style="position:relative;">
<div style="position:relative">
<span>
<span>one</span>
<span><strong>two</strong></span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ export const state = (

export const output = `
<div data-slate-editor="true" contenteditable="true" role="textbox">
<div style="position:relative;">
<div style="position:relative">
<span>
<span>one</span>
<span><span style="font-weight:bold;">two</span></span>
<span><span style="font-weight:bold">two</span></span>
<span>three</span>
</span>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const state = (

export const output = `
<div data-slate-editor="true" contenteditable="true" role="textbox">
<div style="position:relative;">
<div style="position:relative">
<span>
<span>one</span>
<span><span class="bold">two</span></span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ export const state = (

export const output = `
<div data-slate-editor="true" contenteditable="true" role="textbox">
<div style="position:relative;">
<div style="position:relative">
<span>
<span>
<span data-slate-zero-width="true">&#x200A;</span>
</span>
</span>
<span style="position:relative;">
<span style="position:relative">
<span>
<span>word</span>
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const state = (

export const output = `
<div data-slate-editor="true" contenteditable="true" role="textbox">
<div style="position:relative;">
<div style="position:relative">
<span>
<span>word</span>
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const state = (

export const output = `
<div data-slate-editor="true" contenteditable="true" role="textbox">
<div style="position:relative;">
<div style="position:relative">
<span>
<span><br></span>
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const state = (

export const output = `
<div data-slate-editor="true" contenteditable="true" role="textbox">
<div style="position:relative;">
<div style="position:relative">
<span>
<span><br></span>
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ export const state = (

export const output = `
<div data-slate-editor="true" contenteditable="true" role="textbox">
<div style="position:relative;">
<div dir="rtl" style="position:relative;">
<div style="position:relative">
<div dir="rtl" style="position:relative">
<span>
<span>مرحبا بالعالم</span>
</span>
</div>
<div dir="rtl" style="position:relative;">
<div dir="rtl" style="position:relative">
<span>
<span>שלום עולם</span>
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ export const state = (

export const output = `
<div data-slate-editor="true" contenteditable="true" role="textbox">
<div style="position:relative;">
<div style="position:relative">
<span>
<span>Hello, world!</span>
</span>
</div>
<div dir="rtl" style="position:relative;">
<div dir="rtl" style="position:relative">
<span>
<span>مرحبا بالعالم</span>
</span>
</div>
<div dir="rtl" style="position:relative;">
<div dir="rtl" style="position:relative">
<span>
<span>שלום עולם</span>
</span>
Expand Down

0 comments on commit a8b5ca5

Please sign in to comment.