INNER CODE UNIT · JavaScript

classifyLine

karanb192/claude-code-hooks · plugins/bounty-board/bounty-board.js:159

function classifyLine(line) {
  if (!line || line.length > MAX_LINE_LEN) return null;
  let commentSpan;
  for (const rule of RULES) {
    if (rule.kind === 'comment') {
      if (commentSpan === undefined) {
        const cs = commentStart(line);
        commentSpan = cs === -1 ? null : line.slice(cs);
      }
      if (commentSpan !== null && rule.re.test(commentSpan)) return rule;
    } else if (rule.re.test(line)) {
      return rule;
    }
  }
  return null;
}

/**

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…