```ts
export function linkFind(line: string, opens: string, closes: string): string[] {
  if (opens === '' || closes === '') {
    throw new Error('Both opening and closing markers must be provided');
  }

  const matches = [];
  let depth = 0;
  for (let i = 0; i < line.length; i++) {
    const char = line[i];
    if (char === opens) {
      depth++;
      if (depth > 1) {
        continue; // Skip nested markers
      }
      matches.push(line.slice(i + 1, line.indexOf(closes, i + 1)));
    } else if (char === closes && depth > 0) {
      depth--;
    }
  }

  return matches.length > 0 ? matches : [];
}
```