Summary
When printing Markdown, hyperlinks currently render as colored anchor text only — the destination URL is discarded. On paper (and in PDFs shared offline) that loses the useful part of the link. Add a Markdown CTE option to emit the URL alongside (or instead of-only) the anchor text.
Current behavior
In MarkdownCte.FlattenInlines, a LinkInline is flattened to its child text in link color; the Url is never emitted:
case LinkInline link:
FlattenInlines(link, scale, style, LinkColor, tokens);
break;
case AutolinkInline auto:
AppendText(auto.Url, scale, style, LinkColor, tokens);
break;
So [GitHub Pages](https://pages.github.com/) prints as blue GitHub Pages, while bare autolinks already show the URL.
Settings already live on MarkdownCte (RenderMermaidDiagrams, MermaidBackend, …) and are copied via CopyPropertiesFrom / persisted under markdownContentTypeEngineSettings in WinPrint.config.json.
Proposed behavior
Add a boolean setting (name TBD), e.g. ShowLinkUrls (default false to preserve today’s look):
| Markdown |
Today |
With option on |
[GitHub Pages](https://pages.github.com/) |
GitHub Pages |
GitHub Pages (https://pages.github.com/) |
<https://example.com> / autolink |
URL (unchanged) |
URL (unchanged) |
[same as url](https://example.com) |
text |
Prefer not duplicating if anchor text equals URL |
Suggested formatting (open to bikeshed):
anchor text (url) after the link text, same scale/style, still in link color (or dimmer for the parenthetical).
- Skip when
link.Url is empty/null.
- Skip (or don’t double) when normalized anchor text equals the URL.
- Images (
link.IsImage) stay out of scope.
Scope
Why
Print is the product’s job: clickable styling doesn’t help on a physical page or a static PDF. Showing destinations is a common “print-friendly links” feature and matches how many “print stylesheet” / “readable print” tools behave.
Summary
When printing Markdown, hyperlinks currently render as colored anchor text only — the destination URL is discarded. On paper (and in PDFs shared offline) that loses the useful part of the link. Add a Markdown CTE option to emit the URL alongside (or instead of-only) the anchor text.
Current behavior
In
MarkdownCte.FlattenInlines, aLinkInlineis flattened to its child text in link color; theUrlis never emitted:So
[GitHub Pages](https://pages.github.com/)prints as blue GitHub Pages, while bare autolinks already show the URL.Settings already live on
MarkdownCte(RenderMermaidDiagrams,MermaidBackend, …) and are copied viaCopyPropertiesFrom/ persisted undermarkdownContentTypeEngineSettingsinWinPrint.config.json.Proposed behavior
Add a boolean setting (name TBD), e.g.
ShowLinkUrls(defaultfalseto preserve today’s look):[GitHub Pages](https://pages.github.com/)<https://example.com>/ autolink[same as url](https://example.com)Suggested formatting (open to bikeshed):
anchor text (url)after the link text, same scale/style, still in link color (or dimmer for the parenthetical).link.Urlis empty/null.link.IsImage) stay out of scope.Scope
MarkdownCte+CopyPropertiesFromLinkInlineflatten pathRecordingGraphicsContext/ existing Markdown CTE testsWhy
Print is the product’s job: clickable styling doesn’t help on a physical page or a static PDF. Showing destinations is a common “print-friendly links” feature and matches how many “print stylesheet” / “readable print” tools behave.