Wilfred Hughes
34f084d8f1
Calculate content width based on visible lines
2021-07-31 17:21:55 +07:00
Wilfred Hughes
e67732bab9
Improve contiguous novel logic
...
Inspect the previous syntactic node, then get the atom position, open
delimiter position or close delimiter position depending on the
context.
2021-07-31 16:54:14 +07:00
Wilfred Hughes
017c9fb6d8
Define a num_ancestors helper
2021-07-31 16:38:15 +07:00
Wilfred Hughes
444256b3d5
Silence a lossless cast lint from clippy
2021-07-31 12:07:52 +07:00
Wilfred Hughes
e4feb734d4
Formatting
2021-07-31 12:07:46 +07:00
Wilfred Hughes
8de611ae0a
Also store the previous syntax node in SyntaxInfo
2021-07-31 12:03:56 +07:00
Wilfred Hughes
692ad90073
Adding TODO
2021-07-31 11:37:02 +07:00
Wilfred Hughes
ca5e757065
Document OrdVertex fields and improve names
2021-07-31 11:26:03 +07:00
Wilfred Hughes
7ac433acb4
Prefer named struct fields
2021-07-31 11:20:09 +07:00
Wilfred Hughes
7b87434635
Document the purpose of the prev_novel fields
2021-07-31 11:10:17 +07:00
Wilfred Hughes
4f4dfb846e
Fix typo
2021-07-31 11:04:59 +07:00
Wilfred Hughes
59f4b9e0d7
Reorder fields in Vertex
2021-07-31 11:01:39 +07:00
Wilfred Hughes
332aff3810
Don't bother considering ReplacedComment for identical comments
...
It will never be on the shortest path.
2021-07-31 10:57:14 +07:00
Wilfred Hughes
1553533559
Add a sample file exercising contiguous item logic
2021-07-31 10:50:02 +07:00
Wilfred Hughes
5b440a69b3
Link to edges directly
2021-07-31 10:29:48 +07:00
Wilfred Hughes
a4751b98f1
Fix a parsing issue with -> in Rust
2021-07-31 01:25:16 +07:00
Wilfred Hughes
d39dad5bd3
Remove unnecessary clone
2021-07-31 01:15:23 +07:00
Wilfred Hughes
f8a8465f16
Fix some clippy lints from the pedantic category
2021-07-31 01:14:11 +07:00
Wilfred Hughes
689f352046
cargo fmt
2021-07-31 01:01:17 +07:00
Wilfred Hughes
ad9f72d6b4
Run latest clippy on all targets and fix issues
2021-07-31 00:59:21 +07:00
Wilfred Hughes
838626e163
Add some doc comments to dijkstra module
2021-07-31 00:23:34 +07:00
Wilfred Hughes
573cd32a01
Prefer matching comments that are similar
...
Previously, we'd match up any pair of comments with a levenstein
distance of 0.4 or more. This was reasonably effective, but misssed
opportunities even more precise diffs.
Instead, prefer the comment matching with the highest levenshtein
distance.
We still only highlight word-level changes for comments with a
levenshtein of 0.4 or more.
Closes #27
2021-07-30 22:54:30 +07:00
Wilfred Hughes
76c7f35d56
Add module doc comments
2021-07-30 01:23:38 +07:00
Wilfred Hughes
0dba462fb3
Don't expose style functions that aren't used externally
2021-07-30 01:13:39 +07:00
Wilfred Hughes
de9ca2feb1
Improve doc comment wording
2021-07-30 01:11:15 +07:00
Wilfred Hughes
26dc10dc67
read_or_die is only used in main.rs, so move it there
2021-07-30 01:09:23 +07:00
Wilfred Hughes
daa6ac3f3b
Document structs used to track lines
2021-07-30 01:07:51 +07:00
Wilfred Hughes
27c43308c3
Tweak plain text wording to emphasise that it's line oriented
2021-07-30 00:55:31 +07:00
Wilfred Hughes
afcb5f5d9c
Prefer tests in a nested module
2021-07-30 00:45:01 +07:00
Wilfred Hughes
79018c63fe
Be explicit about which languages are supported
2021-07-30 00:38:55 +07:00
Wilfred Hughes
fa69fcc045
Fix rustdoc warning
2021-07-28 00:20:29 +07:00
Wilfred Hughes
6e321d070a
Bump dependencies to latest minor versions
2021-07-28 00:06:58 +07:00
Wilfred Hughes
da63704675
Roll version
2021-07-28 00:04:47 +07:00
Wilfred Hughes
1248682f68
Fix unused import
2021-07-27 23:51:59 +07:00
Wilfred Hughes
d68d803521
Formatting
2021-07-27 23:51:28 +07:00
Wilfred Hughes
c5aee5cc9d
Clarify the license of sample files
2021-07-27 23:50:50 +07:00
Wilfred Hughes
d8fb6413ef
Ignore local notes
2021-07-27 23:49:31 +07:00
Wilfred Hughes
ad585be0fc
Add another elisp sample file
2021-07-27 23:48:58 +07:00
Wilfred Hughes
2aae6b6e77
Add a JS test file showing a larger change
2021-07-27 23:48:03 +07:00
Wilfred Hughes
78d0a354db
Add sample file for changing nesting levels of variables
...
The last expression `res` in `fn parse_lines` was previously handled
badly, choosing an inner `res` occurrence.
2021-07-27 23:46:11 +07:00
Wilfred Hughes
6f2140e901
Replace tabs with spaces before parsing
...
Difftastic uses offsets to store the positions of AST nodes, so we
cannot replace tabs after parsing.
A string literal with a tab character " " being replaced by a four
space string literal " " is now ignored by difftastic. This is
wrong: difftastic should only ignore whitespace between atoms.
This is still an improvement for source code that uses tab characters,
which is common in Go. The above case should be rare until we have a
full solution.
Fixes #24
2021-07-27 23:36:20 +07:00
Wilfred Hughes
a7f688ee82
Put a spacer between LHS and RHS lines printed
...
Width calculations already consider the spacer, but it was lost in a
refactor.
2021-07-27 22:02:48 +07:00
Wilfred Hughes
f24c4954bc
Update changelog for previous commit
2021-07-27 22:01:38 +07:00
maekawatoshiki
725b346c58
Show help if no arguments given
2021-07-26 21:10:27 +07:00
Wilfred Hughes
7701e38510
Add a basic Go parser
2021-07-25 23:46:33 +07:00
Wilfred Hughes
e6693d2204
Add TODO
2021-07-25 13:56:00 +07:00
Wilfred Hughes
f8b6b8ae13
Define a SyntaxInfo::new helper
2021-07-25 13:52:30 +07:00
Wilfred Hughes
171236e2d5
Avoid recompiling another regex
2021-07-25 13:03:15 +07:00
Wilfred Hughes
9c37d854d1
Avoid .unwrap() when printing positions
2021-07-25 13:00:46 +07:00
Wilfred Hughes
6d5704aed9
Only compile the newline regexp once
2021-07-25 12:56:02 +07:00