From 82041d35b1bb1cd01b422327264acdd15418bee6 Mon Sep 17 00:00:00 2001 From: tdro Date: Mon, 18 Dec 2023 20:33:06 -0500 Subject: themes/default/layouts/_default/_markup/render-codeblock: Links content editable false --- .../layouts/_default/_markup/render-codeblock.html | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'themes/default/layouts') diff --git a/themes/default/layouts/_default/_markup/render-codeblock.html b/themes/default/layouts/_default/_markup/render-codeblock.html index 91ee9f6..ab9a786 100644 --- a/themes/default/layouts/_default/_markup/render-codeblock.html +++ b/themes/default/layouts/_default/_markup/render-codeblock.html @@ -1,9 +1,9 @@ -{{- $caption := .Attributes.caption -}} -{{- $type := .Type | default "text" -}} -{{- $options := .Attributes.options | default "default=1" -}} -{{- $hash := print (truncate 3 "" (sha256 .Inner)) (truncate 3 "" (sha256 .Page.RelPermalink)) .Ordinal -}} -{{- $id := print "code-block:" $hash | safeURL -}} -{{- $edit := "false" -}} +{{- $caption := .Attributes.caption -}} +{{- $type := .Type | default "text" -}} +{{- $options := .Attributes.options | default "default=1" -}} +{{- $hash := print (truncate 3 "" (sha256 .Inner)) (truncate 3 "" (sha256 .Page.RelPermalink)) .Ordinal -}} +{{- $id := print "code-block:" $hash | safeURL -}} +{{- $highlight := highlight .Inner $type (print $options ",lineAnchors=" "code-line:" $hash) -}}
@@ -12,7 +12,11 @@
- {{- highlight .Inner $type (print $options ",lineAnchors=" "code-line:" $hash) -}} + {{- replace $highlight + `class="lnlinks"` + `contenteditable="false" class="lnlinks"` + | safeHTML + -}}
-- cgit v1.2.3