Commit graph

51 commits

Author SHA1 Message Date
Armin Ronacher
ff5f4caaa3 Alternative fix for #37 that lets the code hobble on 2022-07-28 20:13:45 +02:00
Armin Ronacher
3a938ae1d3 Raise an explicit panic when context_lines is 0. Fixes #37 2022-07-28 15:15:37 +02:00
Kian-Meng Ang
3c784d6e9d
Fix typos and markdown (#36) 2022-07-22 01:00:36 +02:00
Armin Ronacher
7c04c9b8d3 Derive a default instead of manual impl 2022-01-23 21:02:59 +01:00
Armin Ronacher
4a81e573c2 Fixed a clippy lint 2021-10-03 08:53:23 +02:00
Armin Ronacher
40edf6d427 Added missing snapshots 2021-10-03 08:50:14 +02:00
Armin Ronacher
f0e38d862b Added optional serde support 2021-10-03 08:46:57 +02:00
Armin Ronacher
a3e10af892
Make the change type be generic over any T rather &T (#31)
This makes the interface of this crate more flexible as the utility
methods such as `iter_changes` now also work if a container does not
contain references.
2021-09-11 11:20:51 +02:00
Ben Armstead
0b8e237280
Remove unnecessary borrow (#30) 2021-09-11 00:35:23 +02:00
Armin Ronacher
3cb7d5ab76 Fix the ranges in unified diff output 2021-02-25 23:20:56 +01:00
Armin Ronacher
7e628d78d8
Add compaction support (#22) 2021-02-25 22:13:43 +01:00
Armin Ronacher
28bfd4698a Add default timeout for inline highlighting 2021-02-21 00:18:50 +01:00
Armin Ronacher
74e2805a95
Added deadlines to all algorithms (#18)
This adds a deadline to all algorithms which lets one bail in a fixed amount of
time to avoid pathological cases.
2021-02-20 10:12:06 +01:00
Armin Ronacher
45bcb3943c
Performance improvements for LCS and inline highlighting (#16) 2021-02-17 20:59:55 +01:00
Armin Ronacher
b6e2894f21
Add support for Rust 1.41.0 (#14) 2021-02-15 22:50:12 +01:00
Tom Milligan
6fac8af4d0
internal: remove unneeded boxes (#12) 2021-02-15 13:38:39 +01:00
Armin Ronacher
0341515380
Add NoFinishHook and new Myer's implementation (#11) 2021-02-15 10:24:18 +01:00
Armin Ronacher
df4be6b493 Made the unicode feature optional for inline highlighting 2021-02-07 21:55:57 +01:00
Armin Ronacher
777105fbb0
Added slice remapper and improved documentation (#8)
* Experimental slice remapper
* Added iter_slices to DiffOp
* Improvements to the utility diff functions
* Documentation improvements
* More documentation updates on utils
* More documentation on main text diff
2021-02-06 21:41:49 +01:00
Armin Ronacher
81ef0b1adc Added missing test snapshot 2021-02-04 14:10:32 +01:00
Armin Ronacher
12e7d5e4b0 More generic lifetimes for iter_changes and added iter_all_changes 2021-02-04 12:15:20 +01:00
Armin Ronacher
452c79bac5 Fixed some spelling mistakes 2021-02-03 22:57:25 +01:00
Armin Ronacher
81ba51fc3c Added comment to TextDiff 2021-02-03 22:51:47 +01:00
Armin Ronacher
05f9069769 Fixed a typo in a docstring 2021-02-03 14:39:47 +01:00
Armin Ronacher
3164c72062 Move bytes implementation into a submodule in abstractions 2021-02-03 14:29:24 +01:00
Armin Ronacher
daa3d6cf5e Documentation updates 2021-02-03 01:12:34 +01:00
Armin Ronacher
844769ae19 Move all text functionality toplevel 2021-02-03 00:56:17 +01:00
Armin Ronacher
4770479fd7 Bigger refactorings in module layout 2021-02-03 00:05:54 +01:00
Armin Ronacher
cab87515bd Expose iter_changes outside the text module 2021-02-02 23:48:57 +01:00
Armin Ronacher
d4495038a3 Simplified change newline handling 2021-02-02 22:54:22 +01:00
Armin Ronacher
1991955c52 Restructure crate layout 2021-02-02 22:44:52 +01:00
Armin Ronacher
1f73e01ff1 Rename split methods to tokenize 2021-02-02 21:56:55 +01:00
Armin Ronacher
b3ae45b118 Added missing export 2021-02-02 20:25:28 +01:00
Armin Ronacher
34e5b3d571 Some internal refactorings 2021-02-02 20:22:10 +01:00
Armin Ronacher
4b85e70f91
Add support for byte diffing (#7)
Restructured text diffing to also support bstr
2021-02-02 14:16:00 +01:00
Armin Ronacher
e53427b56f Expose get_diff_ratio 2021-02-01 14:05:44 +01:00
Armin Ronacher
37587908de Add proper multi-sequence inline highlighting
Fixes #5
2021-02-01 01:38:00 +01:00
Armin Ronacher
e14b26502b Make InlineChange consistent with Change for missing_newline 2021-01-31 22:16:45 +01:00
Armin Ronacher
0a4dd224f5 Added support for unicode word splitting and change inline to use it 2021-01-31 22:13:56 +01:00
Armin Ronacher
f3e401fc17 Change behavior of inline diff to be word based
This also fixes a bug with bad indexes and updates the inline terminal
example.
2021-01-31 22:02:09 +01:00
Armin Ronacher
459fdfdf9d Change word diffing to split into words and spaces 2021-01-31 21:42:57 +01:00
Armin Ronacher
158c28784d Added missing docs 2021-01-31 19:35:20 +01:00
Armin Ronacher
7abcdc09d8 Added documentation updates 2021-01-31 19:29:06 +01:00
Armin Ronacher
a9a11e9099 Make missing newline hint in unified diff configurable 2021-01-31 19:23:22 +01:00
Armin Ronacher
4db3f2f77e Change inline changes code to patience 2021-01-31 18:26:16 +01:00
Armin Ronacher
8ea4590a7b Fix snapshots for newline changes 2021-01-31 18:26:06 +01:00
Armin Ronacher
b601164a60 Added initial support for inline diff highlighting 2021-01-31 18:22:37 +01:00
Armin Ronacher
020701c4d5 Improve diff op grouping for full matches
This changes the behavior of the diff op grouping function to return
an empty result if the diff is a full match.  This also adds an example
to demonstrate unified diff rendering.
2021-01-30 23:11:35 +01:00
Armin Ronacher
4459c5ee3a Change default udiff context radius to 3 2021-01-30 22:57:53 +01:00
Armin Ronacher
bce4191356 Explain unified diff header parameter 2021-01-30 22:52:52 +01:00