fix(hashline-edit): address Oracle review feedback
- Extract WRITE_SUCCESS_MARKER constant to couple guard and output string - Remove double blank line after parseLineRefWithHint - Add comment clarifying normalized equals ref.trim() in error paths
This commit is contained in:
@@ -38,6 +38,7 @@ export function parseLineRef(ref: string): LineRef {
|
||||
hash: match[2],
|
||||
}
|
||||
}
|
||||
// normalized equals ref.trim() in all error paths — extraction only succeeds for valid refs
|
||||
const hashIdx = normalized.indexOf('#')
|
||||
if (hashIdx > 0) {
|
||||
const prefix = normalized.slice(0, hashIdx)
|
||||
@@ -151,7 +152,6 @@ function parseLineRefWithHint(ref: string, lines: string[]): LineRef {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export function validateLineRefs(lines: string[], refs: string[]): void {
|
||||
const mismatches: HashMismatch[] = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user