Skip to content

feat: resolve markdown links for fetched pages#144

Merged
chaliy merged 1 commit into
mainfrom
codex/agent-markdown-output
Jul 4, 2026
Merged

feat: resolve markdown links for fetched pages#144
chaliy merged 1 commit into
mainfrom
codex/agent-markdown-output

Conversation

@chaliy

@chaliy chaliy commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

What

Resolve relative anchor and image URLs in fetched HTML markdown against the final response URL. Preserve simple code fence language hints from <pre class="language-..."> / <pre class="lang-...">.

Why

AI agents consume markdown outside the original page context. Absolute links keep citations and follow-up fetches usable after conversion. Language-tagged code fences also improve downstream code understanding.

How

Added html_to_markdown_with_base_url, wired the default fetcher to call it with the final URL, and kept html_to_markdown backward-compatible for direct conversion. Added converter and fetcher tests.

Risk

  • Low
  • Applies only to fetched HTML markdown conversion. Direct helper behavior remains unchanged.

Checklist

  • Unit tests are passed
  • Smoke tests are passed
  • Documentation is updated
  • Specs are up to date and not in conflict

@chaliy chaliy marked this pull request as ready for review July 4, 2026 23:03
@chaliy chaliy merged commit 63b6e93 into main Jul 4, 2026
11 checks passed
@chaliy chaliy deleted the codex/agent-markdown-output branch July 4, 2026 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant