Skip to content

Element that shows diffs between two texts using google_diff_match_patch

License

Notifications You must be signed in to change notification settings

mikaelharsjo/diff-element

Repository files navigation

diff-element

Element that shows diffs between two texts. Built with Polymer and powered by google_diff_match_patch.

See the component page for more information.

Usage

<diff-element
  first="I am the very model of a modern Major-General, I've information vegetable, animal, and mineral, I know the kings of England, and I quote the fights historical, From Marathon to Waterloo, in order categorical."
  second="I am the very model of a cartoon individual, My animation's comical, unusual, and whimsical, I know the kings of England, and I quote the fights historical, From wicked puns and stupid jokes to anvils that drop on your head.">
</diff-element>

screenshot

Contributing

We use Polyserve as your web server to allow canonical paths to bower dependencies. Install with:

npm install -g polyserve

And you can run it via:

polyserve

Once running, you can view the component page at http://localhost:8080/components/diff-element/index.html

Testing

Simply navigate to: http://localhost:8080/components/diff-element/test/index.html

web-component-tester

The tests are also compatible with web-component-tester. You can run them on multiple local browsers via:

npm install -g web-component-tester
wct

About

Element that shows diffs between two texts using google_diff_match_patch

Resources

License

Stars

Watchers

Forks

Packages

No packages published