Existing documentation URL(s)
What changes are you suggesting?
The description of the Markdown Conversion Options (e.g. for the env.AI.toMarkdown binding) describes the HTML hostname option as:
hostname: string to use as a host when resolving relative links inside the HTML.
The property name and this description suggests that a bare example.com style hostname (e.g. the result of URL.hostname) should be used. However, that leaves relative links in the markdown result (if there is no <base> element in the HTML itself).
It appears that this option actually requires a base URL, which will typically be the full URL of the page being converted (URL.origin wouldn't suffice for pages in sub-directories). The How It Works page hints at this, but it should be explicit in the description of the Conversion Options, especially since the option name itself is misleading.
Additional information
No response
Existing documentation URL(s)
What changes are you suggesting?
The description of the Markdown Conversion Options (e.g. for the
env.AI.toMarkdownbinding) describes the HTMLhostnameoption as:The property name and this description suggests that a bare
example.comstyle hostname (e.g. the result ofURL.hostname) should be used. However, that leaves relative links in the markdown result (if there is no<base>element in the HTML itself).It appears that this option actually requires a base URL, which will typically be the full URL of the page being converted (
URL.originwouldn't suffice for pages in sub-directories). The How It Works page hints at this, but it should be explicit in the description of the Conversion Options, especially since the option name itself is misleading.Additional information
No response