Render the new line with ANSI highlighting for terminal output. Returns a string with ANSI escape codes for colored output.
(&self)
| 490 | /// |
| 491 | /// Returns a string with ANSI escape codes for colored output. |
| 492 | pub fn render_new_ansi(&self) -> String { |
| 493 | self.render_with_ansi(self.new_content, &self.new_hunks, false) |
| 494 | } |
| 495 | |
| 496 | /// Internal helper to render content with ANSI codes. |
| 497 | fn render_with_ansi(&self, content: &[u8], hunks: &[ChangeHunk], is_old: bool) -> String { |