Skip to content

Link title attributes incorrectly parsed as part of URL #15

@JakeSCahill

Description

@JakeSCahill

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:

/path/to/page/

Environment

Reproduction

afdocs check https://docs.redpanda.com -v

Look for URLs containing %20%22 in the output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions