aboutsummaryrefslogtreecommitdiff
path: root/layouts/shortcodes/highlight.html
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/shortcodes/highlight.html')
-rw-r--r--layouts/shortcodes/highlight.html5
1 files changed, 5 insertions, 0 deletions
diff --git a/layouts/shortcodes/highlight.html b/layouts/shortcodes/highlight.html
new file mode 100644
index 0000000..6c86ca8
--- /dev/null
+++ b/layouts/shortcodes/highlight.html
@@ -0,0 +1,5 @@
+<!-- https://github.com/jmooring/hugo-testing/blob/hugo-forum-topic-40998/layouts/_default/_markup/render-codeblock-katex.html -->
+{{ .Page.Store.Set "hasCodeBlock" true }}
+
+<!-- https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/shortcodes/highlight.html -->
+{{ if len .Params | eq 2 }}{{ highlight (trim .InnerDeindent "\n\r") (.Get 0) (.Get 1) }}{{ else }}{{ highlight (trim .InnerDeindent "\n\r") (.Get 0) "" }}{{ end }} \ No newline at end of file