Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detecting link changes #28

Closed
maliayas opened this issue Feb 21, 2016 · 6 comments
Closed

Detecting link changes #28

maliayas opened this issue Feb 21, 2016 · 6 comments
Milestone

Comments

@maliayas
Copy link

It seems, neither this fork nor the upstream can detect link changes. For example:

-<a href="http://lorem.com">this part doesn't change</a>
+<a href="http://ipsum.com">this part doesn't change</a>

GitHub rich text diff plays nice with this case. Styling is not in the scope of this library but I've captured some screenshots for inspiration. If ahref attribute is changed, GitHub dotted-underlines it and presents a tooltip:

ekran goruntusu 2016 02 21 22_25_38

Tooltip:

ekran goruntusu 2016 02 21 22_25_47

If link text is also changed, underline and tooltip is gone:

ekran goruntusu 2016 02 21 22_26_10

Could we have this detection in this library? Thanks in advance.

@jschroed91
Copy link
Member

Of course! I'm working on the table diffing feature now, I will try to sneak this in early this week. Unless someone else wants to put in a PR

@maliayas
Copy link
Author

Thanks very much!

@jschroed91
Copy link
Member

@maliayas Just merged in updates to detect link changes - I didn't do anything fancy with tooltips since that is out of the scope of this library. But if a link is changed, the old link will be wrapped in a <del class="diffmod diff-href"></del> and the new link will be wrapped in <ins class="diffmod diff-href"></ins>

@maliayas
Copy link
Author

Lovely! Problem solved. Btw I've made a code review to be helpful.

@jschroed91
Copy link
Member

It's very appreciated! Thank you @maliayas - I will look at your comments and make updates either today or tomorrow morning.

Feel free to suggest additional features/bug fixes in the future, and you are welcome to contribute / open PRs.

We don't have any documentation on contributing at this point, but I hope to do some major clean-up of the code and put together some documentation sometime in the near future.

@maliayas
Copy link
Author

Very nice to hear this. Thanks.

@jschroed91 jschroed91 added this to the 0.1.0 milestone Mar 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants