Skip to content

Skip call sign auto-detection inside code and pre elements#28

Merged
phieri merged 2 commits intomainfrom
copilot/fix-callsign-markup-in-docs
Mar 29, 2026
Merged

Skip call sign auto-detection inside code and pre elements#28
phieri merged 2 commits intomainfrom
copilot/fix-callsign-markup-in-docs

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 29, 2026

searchCallsigns() was marking up call signs inside <code> and <pre> elements, which is nonsensical in code examples (e.g., the SM8AYA on the docs site's "Getting Started" snippet).

Added CODE and PRE to the TreeWalker's parent-tag skip list, alongside the already-skipped SCRIPT, STYLE, and CALL-SIGN:

if (!parent || parent.tagName === 'SCRIPT' || 
    parent.tagName === 'STYLE' || 
    parent.tagName === 'CALL-SIGN' ||
    parent.tagName === 'CODE' ||
    parent.tagName === 'PRE') {
  return NodeFilter.FILTER_REJECT;
}

Verification showing code blocks are unaffected while normal text is still auto-detected


📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

Copilot AI changed the title [WIP] Fix callsign markup in documentation example Skip call sign auto-detection inside code and pre elements Mar 29, 2026
Copilot AI requested a review from phieri March 29, 2026 23:29
@phieri phieri marked this pull request as ready for review March 29, 2026 23:30
@phieri phieri merged commit 1b0ad39 into main Mar 29, 2026
3 checks passed
@phieri phieri deleted the copilot/fix-callsign-markup-in-docs branch March 29, 2026 23:31
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