Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions gitleaks-original-encoded-secrets
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@ def extract(

li_start = start_line - 1
li_end = end_line - 1
col_start = start_column - 1
col_end = end_column
col_start = start_column - 2
col_end = end_column - 1 if start_line - end_line > 0 else end_column - 1 - col_start

# keep the ends to preserve the original string content
lines = file_content.splitlines(keepends=True)
lines = file_content.splitlines()

# scope lines
lines = [line for li, line in enumerate(lines) if li_start <= li <= li_end]
Expand Down