Files
oh-my-opencode/src/tools/hashline-edit/constants.ts
T
YeonGyu-Kim 55c8952668 fix(hashline-edit): update HASHLINE_OUTPUT_PATTERN separator from : to |
The colon separator was missed in PR #2079 which migrated all hashline
format separators from `:` to `|`. This constant is exported as public
API for external consumers.
2026-02-24 15:17:15 +09:00

12 lines
443 B
TypeScript

export const NIBBLE_STR = "ZPMQVRWSNKTXJBYH"
export const HASHLINE_DICT = Array.from({ length: 256 }, (_, i) => {
const high = i >>> 4
const low = i & 0x0f
return `${NIBBLE_STR[high]}${NIBBLE_STR[low]}`
})
export const HASHLINE_REF_PATTERN = /^([0-9]+)#([ZPMQVRWSNKTXJBYH]{2})$/
export const HASHLINE_OUTPUT_PATTERN = /^([0-9]+)#([ZPMQVRWSNKTXJBYH]{2})\|(.*)$/
export const HASHLINE_LEGACY_REF_PATTERN = /^([0-9]+):([0-9a-fA-F]{2,})$/