mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-05-18 14:34:23 +02:00
fix(links.ts): styling
This commit is contained in:
parent
473d05dab7
commit
936ce4ff07
@ -98,7 +98,7 @@ export const CrawlLinks: QuartzTransformerPlugin<Partial<Options>> = (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<Partial<Options>> = (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
|
||||
|
Loading…
x
Reference in New Issue
Block a user