Skip to content

Fix regex word-boundary in anchor tag detection#228

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/sub-pr-227
Draft

Fix regex word-boundary in anchor tag detection#228
Copilot wants to merge 2 commits intomainfrom
copilot/sub-pr-227

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 24, 2026

r"<a\\b" in a raw string produces the regex pattern <a\\b, which matches a literal backslash-b — never present in real HTML. The guard was always false, so tag2html_link re-wrapped already-linked HTML, producing nested <a> elements.

Change

  • tools/create_params.py:1260 — fix double-escaped backslash to proper word-boundary assertion:
# Before (matches literal '\b', never true for real HTML)
if re.search(r"<a\\b", html):

# After (matches word boundary, correctly detects existing <a ...> tags)
if re.search(r"<a\b", html):

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…\\b\")

Co-authored-by: james-ball-qualcomm <140646808+james-ball-qualcomm@users.noreply.github.com>
Agent-Logs-Url: https://github.com/riscv/docs-resources/sessions/10ba52f9-c30e-4589-9dea-b1acf4c4efa7
Copilot AI changed the title [WIP] [WIP] Address feedback from PR #227 on warl wlrl changes Fix regex word-boundary in anchor tag detection Mar 24, 2026
Base automatically changed from add_warl_wlrl to main March 24, 2026 14:37
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.

2 participants