diff options
author | tdro <tdro@noreply.example.com> | 2023-11-20 13:37:47 -0500 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2023-11-20 13:37:47 -0500 |
commit | 2f876ba73cd40fed865ab6c725939fe86d1c9cf4 (patch) | |
tree | 63befb8d431953b636b28127e8f0b21ef513c0cc /themes/default/layouts | |
parent | 46219eb871698585e541caed171a0faf19b8216c (diff) | |
download | canory-2f876ba73cd40fed865ab6c725939fe86d1c9cf4.tar.gz canory-2f876ba73cd40fed865ab6c725939fe86d1c9cf4.tar.bz2 canory-2f876ba73cd40fed865ab6c725939fe86d1c9cf4.zip |
themes/default/layouts/_default/_markup/render-codeblock: Editable content default true
Better compromise
Diffstat (limited to 'themes/default/layouts')
-rw-r--r-- | themes/default/layouts/_default/_markup/render-codeblock.html | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/themes/default/layouts/_default/_markup/render-codeblock.html b/themes/default/layouts/_default/_markup/render-codeblock.html index 435a12b..91ee9f6 100644 --- a/themes/default/layouts/_default/_markup/render-codeblock.html +++ b/themes/default/layouts/_default/_markup/render-codeblock.html @@ -5,17 +5,13 @@ {{- $id := print "code-block:" $hash | safeURL -}} {{- $edit := "false" -}} -{{- if not (in $options "linenos=1") -}} - {{- $edit = "true" -}} -{{- end -}} - <code-block id="{{ $id }}" {{ if in (lower $options) "linenos" }}data-lines=""{{ end }}> <header> <language-label> <a href="#{{ $id }}">{{ $type }}</a> </language-label> </header> - <code-content contenteditable="{{ $edit }}" spellcheck="false"> + <code-content contenteditable="true" spellcheck="false"> {{- highlight .Inner $type (print $options ",lineAnchors=" "code-line:" $hash) -}} </code-content> </code-block> |