diff options
author | Dan Davison <dandavison7@gmail.com> | 2021-11-22 20:15:06 -0500 |
---|---|---|
committer | Dan Davison <dandavison7@gmail.com> | 2021-11-23 19:30:36 -0500 |
commit | 5dc0d6ef7e37a565b06d794b50fcc763079f9ed7 (patch) | |
tree | fc660d958f4d6f341dfa7a8942cb75b489861f28 /etc | |
parent | 87f458ae6be9377c040afadecae0f7f81d5e72b3 (diff) |
New option to map raw styles encountered in input
Unify handling of styles parsed from raw line and computed diff
styles. This enables syntax highlighting to be used in color-moved
sections.
Fixes #72
Diffstat (limited to 'etc')
-rw-r--r-- | etc/examples/72-color-moved-2.diff | 8 | ||||
-rw-r--r-- | etc/examples/72-color-moved-3.diff | 14 |
2 files changed, 22 insertions, 0 deletions
diff --git a/etc/examples/72-color-moved-2.diff b/etc/examples/72-color-moved-2.diff new file mode 100644 index 00000000..69ddc5c8 --- /dev/null +++ b/etc/examples/72-color-moved-2.diff @@ -0,0 +1,8 @@ +[1mdiff --git a/file.py b/file.py[m +[1mindex f07db74..3cb162d 100644[m +[1m--- a/file.py[m +[1m+++ b/file.py[m +[36m@@ -1,2 +1,2 @@[m +[1;35m-class X: pass[m + class Y: pass[m +[1;36m+[m[1;36mclass X: pass[m diff --git a/etc/examples/72-color-moved-3.diff b/etc/examples/72-color-moved-3.diff new file mode 100644 index 00000000..a24d447a --- /dev/null +++ b/etc/examples/72-color-moved-3.diff @@ -0,0 +1,14 @@ +[33mcommit fffb6bf94087c432b6e2e29cab97bf1f8987c641[m +Author: Dan Davison <dandavison7@gmail.com> +Date: Tue Nov 23 14:51:46 2021 -0500 + + DEBUG + +[1mdiff --git a/src/config.rs b/src/config.rs[m +[1mindex efe6adb..9762222 100644[m +[1m--- a/src/config.rs[m +[1m+++ b/src/config.rs[m +[36m@@ -400,6 +400,7 @@[m [mfn make_blame_palette(blame_palette: Option<String>, is_light_mode: bool) -> Vec[m +[1;36m+[m[1;36mpub fn user_supplied_option(option: &str, arg_matches: &clap::ArgMatches) -> bool {[m +[36m@@ -416,29 +433,30 @@[m [mfn make_styles_map(opt: &cli::Opt) -> Option<HashMap<style::AnsiTermStyleEqualit[m +[1;35m-pub fn user_supplied_option(option: &str, arg_matches: &clap::ArgMatches) -> bool {[m |