Skip to content

Commit a1571ab

Browse files
committed
fix: revert back to table based layout, add example image (fixes #35, #15, #21)
1 parent 5986896 commit a1571ab

File tree

12 files changed

+19053
-156
lines changed

12 files changed

+19053
-156
lines changed

.idea/react-diff-viewer-continued.iml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
A simple and beautiful text diff viewer component made with [Diff](https://github.com/kpdecker/jsdiff) and [React](https://reactjs.org).
1414

15+
![example image](./example.jpg)
16+
1517
Inspired by the Github diff viewer, it includes features like split view, inline view, word diff, line highlight and more. It is highly customizable and it supports almost all languages.
1618

1719
Most credit goes to [Pranesh Ravi](https://praneshravi.in) who created the [original diff viewer](https://github.com/praneshr/react-diff-viewer). I've just made a few modifications and updated the dependencies so they work with modern stacks.

example.jpg

118 KB
Loading

examples/src/diff/javascript/new.rjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ var webpack = require('webpack');
33
var HtmlWebpackPlugin = require('html-webpack-plugin');
44
var ExtractTextPlugin = require('extract-text-webpack-plugin');
55
var WriteFilePlugin = require('write-file-webpack-plugin');
6+
const additionalConfiguration = {
7+
contentBase: path.resolve(__dirname, './app'),
8+
reloadModules: true,
9+
}
610
module.exports = {
711
entry: [
812
'webpack/hot/dev-server',
@@ -40,6 +44,8 @@ module.exports = {
4044
},
4145
],
4246
},
47+
trailingSpaces: '',
48+
test: "this is an incredibly long string that should be broken up into multiple lines to make it easier to read and maintain. This is a test of the emergency broadcast system. This is only a test. If this were a real emergency, you would be instructed to do something else. But it's not, so you're not. You're just reading a long string. Sorry. ",
4349
plugins: [
4450
new WriteFilePlugin(),
4551
new ExtractTextPlugin('app.css', {

examples/src/diff/javascript/old.rjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ module.exports = {
6060
},
6161
],
6262
},
63+
trailingSpaces: '',
6364
plugins: [
6465
new WriteFilePlugin(),
6566
new ExtractTextPlugin('app.css', {

0 commit comments

Comments
 (0)