Skip to content

Improve Markdown link target validation - #254

Open
Nagulanvelu wants to merge 1 commit into
FinanceFlash:mainfrom
Nagulanvelu:test/validate-scenario-outcomes
Open

Nagulanvelu wants to merge 1 commit into
FinanceFlash:mainfrom
Nagulanvelu:test/validate-scenario-outcomes

Conversation

@Nagulanvelu

Copy link
Copy Markdown

Problem and scope

The local Markdown link validation test does not correctly handle link destinations containing optional quoted titles or angle brackets. This can cause valid local links to be interpreted as incorrect file paths.

This change focuses only on improving Markdown link target parsing in the repository quality tests.

What changed

  • Added a markdown_link_target() helper to normalize Markdown link destinations.
  • Added parameterized tests for plain paths, quoted link titles, and angle-bracket destinations.
  • Updated the local Markdown link validation test to use the helper.

Verification

  • python -m black --config .github/quality/pyproject.toml --check .github/quality/tests
  • python -m flake8 --config .github/quality/.flake8 .github/quality/tests
  • python -m pytest -c .github/quality/pyproject.toml .github/quality/tests — 908 passed
  • I used UnvibeCode on a representative repository when the change affects code analysis, CLI behaviour, engineering guidance, or code-specific claims.
  • I updated documentation for changed user-facing behaviour.
  • I included no credentials, proprietary source, customer data, generated customer reports, or unsanitized logs.

Workflow-pack checks

Not applicable. This change does not add or modify a pre-built workflow pack.

Remaining limitations

The existing regular expression is not a complete CommonMark parser and may not handle every valid Markdown link syntax, including destinations containing complex parentheses. This change addresses quoted titles and angle-bracket destinations without introducing a full Markdown parser.

This branch has not been deployed

No deployments
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