# Discourse diff library

**URL:** https://meta.discourse.org/t/discourse-diff-library/90865
**Category:** Support
**Created:** [June 27, 2018, 11:12am UTC](https://meta.discourse.org/t/discourse-diff-library/90865 "2018-06-27T11:12:50Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![hosna](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hosna/32/99969_2.png) [@hosna](https://meta.discourse.org/u/hosna)
#### Post date: [June 27, 2018, 11:12am UTC](https://meta.discourse.org/t/discourse-diff-library/90865/1 "2018-06-27T11:12:50Z")

</div>

What is the library behind discourse difference preview between different versions? Its really nice and interesting and I want to use it inside my application, if possible.

---

<div class="post-metadata">

### Author: ![bts](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bts/32/184556_2.png) [@bts](https://meta.discourse.org/u/bts)
#### Post date: [June 27, 2018, 3:11pm UTC](https://meta.discourse.org/t/discourse-diff-library/90865/2 "2018-06-27T15:11:11Z")

</div>

I think you’re in luck…looks like someone extracted this recently into a standalone Ruby gem!

> [@Extracting discourse's text diffing functionality](https://meta.discourse.org/t/extracting-discourses-text-diffing-functionality/87236):
>
> I’ve recently found myself with a need for Discourse’s excellent post diffing functionality in a project. Normally for a project like this I’d take a look at Discourse’s code and re-implement it to my taste, but this time it struck me as an great library to extract (given that it’s self-contained and uses a computer-sciency algorithm with a fancy name and whatnot) I’ve extracted it to a gem here: [https://www.github.com/gdpelican/discourse-diff](https://www.github.com/gdpelican/discourse-diff) Which is a straight port of the exis…

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [June 28, 2018, 12:26am UTC](https://meta.discourse.org/t/discourse-diff-library/90865/3 "2018-06-28T00:26:08Z")

</div>


