From b0e15e0cbc445e12e3aabfe90ee2fc6bf2c33782 Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Mon, 02 May 2022 16:19:26 +0000
Subject: [PATCH] Merge pull request #118 from aidenybai/add-router

---
 layouts/partials/textprocessing.html |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/layouts/partials/textprocessing.html b/layouts/partials/textprocessing.html
index 2312aa4..8e8c999 100644
--- a/layouts/partials/textprocessing.html
+++ b/layouts/partials/textprocessing.html
@@ -53,4 +53,8 @@
     {{end}}
   {{end}}
 {{end}}
+
+{{/* Add copyable anchors */}}
+{{ $content = $content | replaceRE "(<h[1-9] id=\"([^\"]+)\">)(.+)(</h[1-9]>)" `<a href="#${2}">${1}<span class="hanchor" ariaLabel="Anchor"># </span>${3}${4}</a>` }}
+
 {{ $content | safeHTML }}

--
Gitblit v1.10.0