fix: copy code block logic for non code pages
This commit is contained in:
parent
a47218d28c
commit
1d5530e22f
@ -56,9 +56,7 @@
|
|||||||
|
|
||||||
{{ if $.Site.Data.config.enableCodeBlockCopy }}
|
{{ if $.Site.Data.config.enableCodeBlockCopy }}
|
||||||
{{ $clipboard := resources.Get "js/clipboard.js" | resources.Fingerprint "md5" | resources.Minify }}
|
{{ $clipboard := resources.Get "js/clipboard.js" | resources.Fingerprint "md5" | resources.Minify }}
|
||||||
{{ if (findRE "<pre" .Content 1) }}
|
<script src="{{$clipboard.Permalink}}"></script>
|
||||||
<script src="{{$clipboard.Permalink}}"></script>
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<!-- Preload page vars -->
|
<!-- Preload page vars -->
|
||||||
|
Loading…
Reference in New Issue
Block a user