From 936ce4ff07fa63bd913bb56538758d6f673e8e27 Mon Sep 17 00:00:00 2001 From: bfahrenfort Date: Mon, 23 Dec 2024 14:34:08 -0600 Subject: [PATCH] fix(links.ts): styling --- quartz/plugins/transformers/links.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/quartz/plugins/transformers/links.ts b/quartz/plugins/transformers/links.ts index cc85c6acd..7c54219b9 100644 --- a/quartz/plugins/transformers/links.ts +++ b/quartz/plugins/transformers/links.ts @@ -98,7 +98,7 @@ export const CrawlLinks: QuartzTransformerPlugin> = (userOpts) tagName: "img", properties: { src: (sub as Image).src, - style: "max-width:1em;max-height:1em", + style: "max-width:1em;max-height:1em;margin:0px", }, children: [], } @@ -137,6 +137,8 @@ export const CrawlLinks: QuartzTransformerPlugin> = (userOpts) const isExternal = URL.canParse(dest) classes.push(isExternal || matched ? "external" : "internal") + // If the link matched a substitution, display the corresponding image afterwards; + // otherwise, if it's an external link, display the default external link icon if ((isExternal && opts.externalLinkIcon) || matched) { node.children.push( refIcon != null