From f7027e7ecd26abe2a99ea1bb280808a4294bb4f2 Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Wed, 20 Apr 2022 16:20:21 +0000
Subject: [PATCH] Merge pull request #108 from exu3/patch-1
---
layouts/partials/textprocessing.html | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/layouts/partials/textprocessing.html b/layouts/partials/textprocessing.html
index ad76d04..2312aa4 100644
--- a/layouts/partials/textprocessing.html
+++ b/layouts/partials/textprocessing.html
@@ -10,7 +10,7 @@
{{end}}
{{/* Wikilinks */}}
-{{$wikilinks := $raw | findRE "!?\\[\\[\\S[^\\[\\]\\|]*(?:\\|[^\\[\\]]*)?\\S\\]\\]" }}
+{{$wikilinks := $content | findRE "!?\\[\\[\\S[^\\[\\]\\|]*(?:\\|[^\\[\\]]*)?\\S\\]\\]" }}
{{$codefences := $raw | findRE "\\x60[^\\x60\\n]+\\x60"}}
{{$codeblocks := $raw | findRE "\\x60{3}[^\\x60]+\\x60{3}"}}
{{$code := union $codefences $codeblocks}}
@@ -26,7 +26,7 @@
{{if (hasPrefix . "!")}}
{{$inner := . | strings.TrimPrefix "![[" | strings.TrimSuffix "]]" }}
{{$split := split $inner "|"}}
- {{$path := index $split 0}}
+ {{$path := index $split 0 | relURL}}
{{$reference := split $path "#"}}
{{$title := index $reference 0}}
{{$display := default $title (index $split 1)}}
--
Gitblit v1.10.0