Description
When parsing Markdown links that include title attributes, afdocs incorrectly concatenates the title text as part of the URL. This occurs both for single-line and multi-line link syntax.
Examples
Single-line (valid Markdown):
[Cloud](/path/to/page/ "View the Cloud version")
Multi-line (also valid Markdown per CommonMark spec):
[Cloud](/path/to/page/
"View the Cloud version")
Both are valid and parse correctly with standard Markdown parsers (tested with marked), but afdocs extracts the URL as:
/path/to/page/%20%22View%20the%20Cloud%20version%22
Impact
This causes multiple check failures when crawling sites that use link title attributes:
- llms-txt-directive: Reports HTTP 404 for non-existent URLs
- markdown-url-support: Reports "no .md URL found" for invalid paths
- content-negotiation: Reports "returns HTML, ignores Accept header" for 404 pages
Expected Behavior
The title attribute should be stripped when extracting URLs. The URL should be:
Environment
Reproduction
afdocs check https://docs.redpanda.com -v
Look for URLs containing %20%22 in the output.
Description
When parsing Markdown links that include title attributes, afdocs incorrectly concatenates the title text as part of the URL. This occurs both for single-line and multi-line link syntax.
Examples
Single-line (valid Markdown):
Multi-line (also valid Markdown per CommonMark spec):
Both are valid and parse correctly with standard Markdown parsers (tested with
marked), but afdocs extracts the URL as:Impact
This causes multiple check failures when crawling sites that use link title attributes:
Expected Behavior
The title attribute should be stripped when extracting URLs. The URL should be:
Environment
Reproduction
Look for URLs containing
%20%22in the output.