fix(hashline-edit): tolerate >>> prefix and spaces around # in line refs

This commit is contained in:
YeonGyu-Kim
2026-02-24 18:21:05 +09:00
parent 365d863e3a
commit b8257dc59c
2 changed files with 30 additions and 2 deletions
@@ -74,6 +74,28 @@ describe("parseLineRef", () => {
//#then
expect(result).toEqual({ line: 42, hash: "VK" })
})
it("accepts refs copied with >>> marker only", () => {
//#given
const ref = ">>> 42#VK"
//#when
const result = parseLineRef(ref)
//#then
expect(result).toEqual({ line: 42, hash: "VK" })
})
it("accepts refs with spaces around hash separator", () => {
//#given
const ref = "42 # VK"
//#when
const result = parseLineRef(ref)
//#then
expect(result).toEqual({ line: 42, hash: "VK" })
})
})
describe("validateLineRef", () => {