MCPcopy Index your code
hub / github.com/codeaashu/claude-code / extractHyperlinkFromStyles

Function extractHyperlinkFromStyles

src/ink/screen.ts:1099–1111  ·  view source on GitHub ↗
(
  styles: AnsiCode[],
)

Source from the content-addressed store, hash-verified

1097export const OSC8_PREFIX = `${ESC}]8${SEP}`
1098
1099export function extractHyperlinkFromStyles(
1100 styles: AnsiCode[],
1101): Hyperlink | null {
1102 for (const style of styles) {
1103 const code = style.code
1104 if (code.length < 5 || !code.startsWith(OSC8_PREFIX)) continue
1105 const match = code.match(OSC8_REGEX)
1106 if (match) {
1107 return match[1] || null
1108 }
1109 }
1110 return null
1111}
1112
1113export function filterOutHyperlinkStyles(styles: AnsiCode[]): AnsiCode[] {
1114 return styles.filter(

Callers 1

flushBufferFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected