Skip to content

Commit e130af2

Browse files
committed
Formatting README
1 parent cf4349f commit e130af2

File tree

1 file changed

+70
-70
lines changed

1 file changed

+70
-70
lines changed

README.md

Lines changed: 70 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ if(a === 10) {
5151
`;
5252

5353
class Diff extends PureComponent {
54-
render = () => {
55-
return (
56-
<ReactDiffViewer oldValue={oldCode} newValue={newCode} splitView={true} />
57-
);
58-
};
54+
render = () => {
55+
return (
56+
<ReactDiffViewer oldValue={oldCode} newValue={newCode} splitView={true} />
57+
);
58+
};
5959
}
6060
```
6161

@@ -94,7 +94,7 @@ An example using [Prism JS](https://prismjs.com)
9494
```html
9595
// Load Prism CSS
9696
<link
97-
href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.15.0/prism.min.css"
97+
href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.15.0/prism.min.css"
9898
/>
9999

100100
// Load Prism JS
@@ -126,25 +126,25 @@ if(a === 10) {
126126
`;
127127

128128
class Diff extends PureComponent {
129-
highlightSyntax = str => (
130-
<pre
131-
style={{ display: 'inline' }}
132-
dangerouslySetInnerHTML={{
133-
__html: Prism.highlight(str, Prism.languages.javascript),
134-
}}
135-
/>
136-
);
137-
138-
render = () => {
139-
return (
140-
<ReactDiffViewer
141-
oldValue={oldCode}
142-
newValue={newCode}
143-
splitView={true}
144-
renderContent={this.highlightSyntax}
145-
/>
146-
);
147-
};
129+
highlightSyntax = str => (
130+
<pre
131+
style={{ display: 'inline' }}
132+
dangerouslySetInnerHTML={{
133+
__html: Prism.highlight(str, Prism.languages.javascript),
134+
}}
135+
/>
136+
);
137+
138+
render = () => {
139+
return (
140+
<ReactDiffViewer
141+
oldValue={oldCode}
142+
newValue={newCode}
143+
splitView={true}
144+
renderContent={this.highlightSyntax}
145+
/>
146+
);
147+
};
148148
}
149149
```
150150

@@ -183,16 +183,16 @@ const newCode = `
183183
`;
184184

185185
class Diff extends PureComponent {
186-
render = () => {
187-
return (
188-
<ReactDiffViewer
189-
oldValue={oldCode}
190-
newValue={newCode}
191-
compareMethod={DiffMethod.WORDS}
192-
splitView={true}
193-
/>
194-
);
195-
};
186+
render = () => {
187+
return (
188+
<ReactDiffViewer
189+
oldValue={oldCode}
190+
newValue={newCode}
191+
compareMethod={DiffMethod.WORDS}
192+
splitView={true}
193+
/>
194+
);
195+
};
196196
}
197197
```
198198

@@ -312,41 +312,41 @@ if(a === 10) {
312312
`;
313313

314314
class Diff extends PureComponent {
315-
highlightSyntax = str => (
316-
<span
317-
style={{ display: 'inline' }}
318-
dangerouslySetInnerHTML={{
319-
__html: Prism.highlight(str, Prism.languages.javascript),
320-
}}
321-
/>
322-
);
323-
324-
render = () => {
325-
const newStyles = {
326-
variables: {
327-
dark: {
328-
highlightBackground: '#fefed5',
329-
highlightGutterBackground: '#ffcd3c',
330-
},
331-
},
332-
line: {
333-
padding: '10px 2px',
334-
'&:hover': {
335-
background: '#a26ea1',
336-
},
337-
},
338-
};
339-
340-
return (
341-
<ReactDiffViewer
342-
styles={newStyles}
343-
oldValue={oldCode}
344-
newValue={newCode}
345-
splitView={true}
346-
renderContent={this.highlightSyntax}
347-
/>
348-
);
349-
};
315+
highlightSyntax = str => (
316+
<span
317+
style={{ display: 'inline' }}
318+
dangerouslySetInnerHTML={{
319+
__html: Prism.highlight(str, Prism.languages.javascript),
320+
}}
321+
/>
322+
);
323+
324+
render = () => {
325+
const newStyles = {
326+
variables: {
327+
dark: {
328+
highlightBackground: '#fefed5',
329+
highlightGutterBackground: '#ffcd3c',
330+
},
331+
},
332+
line: {
333+
padding: '10px 2px',
334+
'&:hover': {
335+
background: '#a26ea1',
336+
},
337+
},
338+
};
339+
340+
return (
341+
<ReactDiffViewer
342+
styles={newStyles}
343+
oldValue={oldCode}
344+
newValue={newCode}
345+
splitView={true}
346+
renderContent={this.highlightSyntax}
347+
/>
348+
);
349+
};
350350
}
351351
```
352352

0 commit comments

Comments
 (0)