Files
openchamber/packages
Roberto Bertó f71deeb04a feat: linkify file paths inside fenced code blocks (#1560)
Extends existing file-reference detection (currently only inline code and
anchor tags) to also wrap path-like tokens inside <pre><code> blocks,
making shell-output paths like 'src/foo.ts:42' clickable just like
inline ones.

Implementation in MarkdownRendererImpl.tsx:
- New regex BLOCK_PATH_TOKEN_RE matches paths with mandatory extension
  and optional :line[:col] suffix.
- New helper wrapBlockCodePathTokens() walks text nodes in each
  rendered <pre><code>, wraps matches in
  <span data-openchamber-block-path-token="true">, and marks the
  block as scanned (data-openchamber-block-paths-scanned) to avoid
  re-walking.
- annotateFileLinks() invokes the wrapper and extends its selector
  to include the new tokens; the rest of the pipeline (stat check,
  click handler) is reused unchanged.
- Code blocks longer than 200KB are skipped to keep large outputs
  (git log, build logs) cheap.
2026-06-12 23:17:48 +03:00
..
2026-06-12 20:08:19 +03:00