about summary refs log tree commit diff
path: root/themes/researcher/layouts/shortcodes/math.html
diff options
context:
space:
mode:
Diffstat (limited to 'themes/researcher/layouts/shortcodes/math.html')
-rw-r--r--themes/researcher/layouts/shortcodes/math.html8
1 files changed, 8 insertions, 0 deletions
diff --git a/themes/researcher/layouts/shortcodes/math.html b/themes/researcher/layouts/shortcodes/math.html
new file mode 100644
index 0000000..a429888
--- /dev/null
+++ b/themes/researcher/layouts/shortcodes/math.html
@@ -0,0 +1,8 @@
+{{ if or (hasPrefix .Inner "\n") (hasPrefix .Inner "<p>") }}
+    $$
+    {{ $inner := trim (.Inner | htmlUnescape) "$\n " }}
+    {{- replace $inner "\n" " " -}}
+    $$
+{{ else }}
+    ${{- trim (.Inner | htmlUnescape) "$\n " -}}$
+{{ end }}