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:
YeonGyu-Kim
2026-02-24 17:41:30 +09:00
parent 55ad4297d4
commit a567cd0d68
2 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -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[] = []