d28ebd10c1
Remove the old LINE:HEX (e.g. "42:ab") reference format support. All refs now use LINE#ID format exclusively (e.g. "42#VK"). Also fixes HASHLINE_OUTPUT_PATTERN to use | separator (was missed in PR #2079).
11 lines
369 B
TypeScript
11 lines
369 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})\|(.*)$/
|