Add support for HTML <a> anchor tags with links#53
Merged
LittleLittleCloud merged 5 commits intomainfrom Oct 23, 2025
Merged
Conversation
Co-authored-by: LittleLittleCloud <16876986+LittleLittleCloud@users.noreply.github.com>
Co-authored-by: LittleLittleCloud <16876986+LittleLittleCloud@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add support for a tag element
Add support for HTML Oct 23, 2025
<a> anchor tags with links
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds support for HTML
<a>anchor tags in RazorConsole, enabling developers to create clickable hyperlinks in their console applications using familiar HTML syntax.What's New
RazorConsole now supports the
<a>tag withhrefattributes, which are automatically converted to Spectre.Console's link markup format. Links will be clickable in modern terminals that support hyperlinks (Windows Terminal, iTerm2, GNOME Terminal, etc.).Basic Usage
Advanced Features
Multiple links in text:
Links with nested formatting:
Automatic fallback:
Implementation Details
Changes Made
Extended
HtmlInlineTextElementTranslator: Added support for<a>tags alongside existing inline elements like<strong>,<em>, and<code>. URLs are automatically escaped for safety, and nested formatting is fully supported.Fixed
ParagraphElementTranslator: Updated to handle mixed content (text + inline elements) instead of text-only content. This allows<p>tags to contain anchor links and other inline formatting elements, making the paragraph translator more robust and consistent with HTML semantics.Testing
Breaking Changes
None. This is a purely additive feature that extends existing functionality without modifying any public APIs or breaking existing behavior.
Original prompt
Fixes #52
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.