From e6d3b5dd2de8d1582f6d1a4dee4d406cc32d2138 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20de=20Souza?= Date: Wed, 24 Apr 2024 08:50:00 +0200 Subject: [PATCH] Simplify code in render-heading.html --- layouts/_default/_markup/render-heading.html | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/layouts/_default/_markup/render-heading.html b/layouts/_default/_markup/render-heading.html index c538473..678ab65 100644 --- a/layouts/_default/_markup/render-heading.html +++ b/layouts/_default/_markup/render-heading.html @@ -1,3 +1,6 @@ - - {{ safeHTML .Text }} - +{{ $level := add .Level site.Params.headingoffset | math.Max 1 }} +{{ $anchor := safeURL .Anchor }} + + + {{ safeHTML .Text }} +