summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorDan Davison <dandavison7@gmail.com>2021-11-22 20:15:06 -0500
committerDan Davison <dandavison7@gmail.com>2021-11-23 19:30:36 -0500
commit5dc0d6ef7e37a565b06d794b50fcc763079f9ed7 (patch)
treefc660d958f4d6f341dfa7a8942cb75b489861f28 /etc
parent87f458ae6be9377c040afadecae0f7f81d5e72b3 (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.diff8
-rw-r--r--etc/examples/72-color-moved-3.diff14
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 @@
+diff --git a/file.py b/file.py
+index f07db74..3cb162d 100644
+--- a/file.py
++++ b/file.py
+@@ -1,2 +1,2 @@
+-class X: pass
+ class Y: pass
++class X: pass
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 @@
+commit fffb6bf94087c432b6e2e29cab97bf1f8987c641
+Author: Dan Davison <dandavison7@gmail.com>
+Date: Tue Nov 23 14:51:46 2021 -0500
+
+ DEBUG
+
+diff --git a/src/config.rs b/src/config.rs
+index efe6adb..9762222 100644
+--- a/src/config.rs
++++ b/src/config.rs
+@@ -400,6 +400,7 @@ fn make_blame_palette(blame_palette: Option<String>, is_light_mode: bool) -> Vec
++pub fn user_supplied_option(option: &str, arg_matches: &clap::ArgMatches) -> bool {
+@@ -416,29 +433,30 @@ fn make_styles_map(opt: &cli::Opt) -> Option<HashMap<style::AnsiTermStyleEqualit
+-pub fn user_supplied_option(option: &str, arg_matches: &clap::ArgMatches) -> bool {