Skip to content

Commit

Permalink
fix: revert back to table based layout, add example image (fixes #35, #…
Browse files Browse the repository at this point in the history
  • Loading branch information
Aeolun committed Feb 14, 2024
1 parent 5986896 commit a1571ab
Show file tree
Hide file tree
Showing 12 changed files with 19,053 additions and 156 deletions.
3 changes: 3 additions & 0 deletions .idea/react-diff-viewer-continued.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

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

![example image](./example.jpg)

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.

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.
Expand Down
Binary file added example.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions examples/src/diff/javascript/new.rjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var WriteFilePlugin = require('write-file-webpack-plugin');
const additionalConfiguration = {
contentBase: path.resolve(__dirname, './app'),
reloadModules: true,
}
module.exports = {
entry: [
'webpack/hot/dev-server',
Expand Down Expand Up @@ -40,6 +44,8 @@ module.exports = {
},
],
},
trailingSpaces: '',
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. ",
plugins: [
new WriteFilePlugin(),
new ExtractTextPlugin('app.css', {
Expand Down
1 change: 1 addition & 0 deletions examples/src/diff/javascript/old.rjs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ module.exports = {
},
],
},
trailingSpaces: '',
plugins: [
new WriteFilePlugin(),
new ExtractTextPlugin('app.css', {
Expand Down
Loading

0 comments on commit a1571ab

Please sign in to comment.