From 65418aaa3bc064dc7ce34e6d2f231b96a5c6acb9 Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Thu, 25 May 2023 01:18:59 -0400 Subject: Move image --- ARCHITECTURE.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index 8e9175d4..4841c75e 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -80,10 +80,6 @@ Delta's `navigate` feature is implemented by constructing an appropriate regex a Here we will follow one code path in detail: [handling diff hunk lines](https://github.com/dandavison/delta/blob/1e1bd6b6b96a3515fd7c70d6b252a25eb9807dc7/src/handlers/hunk.rs#L27) (removed/unchanged/added). This is the most important, and most complex, code path. -
-image -
- Recall that git diff output contains multiple diff "hunks". A hunk is a sequence of diff lines describing the changes among some lines of code that are close together in the same file. A git diff may have many hunks, from multiple files (and therefore multiple languages). @@ -99,6 +95,10 @@ Now, we are at the end of a subhunk, and we have a sequence of minus lines, and Delta [processes a subhunk](https://github.com/dandavison/delta/blob/d92c3ead769326461ea082632e3aa15ca7700d4e/src/paint.rs#L598) (`paint_minus_and_plus_lines`) as follows: +
+image +
+ 1. **Compute syntax (foreground) styles for the subhunk** We [call](https://github.com/dandavison/delta/blob/d92c3ead769326461ea082632e3aa15ca7700d4e/src/paint.rs#L605-L608) the [syntect](https://github.com/trishume/syntect) library to compute syntax highlighting styles for each of the minus lines, and each of the plus lines, if the minus/plus styles specify syntax highlighting. -- cgit v1.2.3