From c89b0702ab49beb5bdb68d70b298fec6ca6cfa48 Mon Sep 17 00:00:00 2001 From: bouncepaw Date: Tue, 1 Dec 2020 15:05:57 +0500 Subject: [PATCH] Handle relative paths in img --- markup/img.go | 2 +- templates/default.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/markup/img.go b/markup/img.go index 6445ed1..9539498 100644 --- a/markup/img.go +++ b/markup/img.go @@ -218,7 +218,7 @@ func (img *Img) checkLinks() map[string]bool { } HyphaIterate(func(hyphaName string) { for _, entry := range img.entries { - if hyphaName == entry.trimmedPath { + if hyphaName == xclCanonicalName(img.hyphaName, entry.trimmedPath) { m[entry.trimmedPath] = true } } diff --git a/templates/default.css b/templates/default.css index f79a0a8..5d5c6e2 100644 --- a/templates/default.css +++ b/templates/default.css @@ -26,7 +26,7 @@ article pre.codeblock {background-color:#eee; padding:.5rem; white-space: pre-wr .transclusion code, .transclusion .codeblock {background-color:#ddd;} .transclusion {background-color:#eee; border-radius: .25rem; } .transclusion__content > *:not(.binary-container) {margin: 0.5rem; } -.transclusion__link {display: block; text-align: right; font-style: italic; margin-top: 0.5rem; color: black; text-decoration: none;} +.transclusion__link {display: block; text-align: right; font-style: italic; margin-top: .5rem; margin-right: .25rem; color: black; text-decoration: none;} .transclusion__link::before {content: "⇐ ";} .binary-container_with-img img,