aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/shortcodes/mark.html
diff options
context:
space:
mode:
Diffstat (limited to 'themes/default/layouts/shortcodes/mark.html')
-rw-r--r--themes/default/layouts/shortcodes/mark.html10
1 files changed, 7 insertions, 3 deletions
diff --git a/themes/default/layouts/shortcodes/mark.html b/themes/default/layouts/shortcodes/mark.html
index 02af225..122a521 100644
--- a/themes/default/layouts/shortcodes/mark.html
+++ b/themes/default/layouts/shortcodes/mark.html
@@ -1,5 +1,9 @@
-{{- $text := default "highligted text" (.Get "text" | default (.Get 0)) -}}
-{{- $title := default $text (.Get "title" | default (.Get 1)) -}}
+{{- $text := default "mark" (.Get "text" | default (.Get 0)) -}}
+{{- $title := default "highlighted text" (.Get "title" | default (.Get 1)) -}}
-<mark title="{{ $title }}">{{ $text }}</mark>
+{{- if gt (len .Inner) 1 -}}
+ {{- $text = .Inner -}}
+{{- end -}}
+
+<mark title="{{- $title -}}">{{- $text -}}</mark>
{{- /* This comment removes trailing newlines and white spaces. */ -}}