diff options
author | Indrajith K L | 2022-03-20 00:38:25 +0530 |
---|---|---|
committer | Indrajith K L | 2022-03-20 00:38:25 +0530 |
commit | 941642aee876a97dbb79666d8fabaa2b1feb9ff5 (patch) | |
tree | 6147d3027127466b312eaa0b34c75966743bf547 /themes/terminal/layouts/shortcodes/prismjs.html | |
parent | 31fc0796a09e1c0b8acbee6ac2fbee17d525b528 (diff) | |
download | experimentsofindrajith-941642aee876a97dbb79666d8fabaa2b1feb9ff5.tar.gz experimentsofindrajith-941642aee876a97dbb79666d8fabaa2b1feb9ff5.tar.bz2 experimentsofindrajith-941642aee876a97dbb79666d8fabaa2b1feb9ff5.zip |
Theme changes
Diffstat (limited to 'themes/terminal/layouts/shortcodes/prismjs.html')
-rw-r--r-- | themes/terminal/layouts/shortcodes/prismjs.html | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/themes/terminal/layouts/shortcodes/prismjs.html b/themes/terminal/layouts/shortcodes/prismjs.html new file mode 100644 index 0000000..e4acffe --- /dev/null +++ b/themes/terminal/layouts/shortcodes/prismjs.html @@ -0,0 +1,25 @@ +{{ $inner := replaceRE "^\r?\n" "" .Inner | string }} +{{ if len .Params | eq 0 }} + <pre><code>{{ $inner }}</code></pre> +{{ else }} + {{ if .IsNamedParams }} + <pre class=" + {{- if .Get "lang" }}language-{{ .Get "lang" }}{{ end }} + {{- if .Get "line-numbers" }} line-numbers{{ end }} + {{- if .Get "command-line" }} command-line{{ end }}" + {{- /* line highlight plugin */ -}} + {{- if .Get "line" }} data-line="{{ .Get "line" }}"{{ end }} + {{- /* line number plugin */ -}} + {{- if .Get "start" }} data-start="{{ .Get "start" }}"{{ end }} + {{- /* command-line plugin */ -}} + {{- if .Get "user" }} data-user="{{ .Get "user" }}"{{ end }} + {{- if .Get "host" }} data-host="{{ .Get "host" }}"{{ end }} + {{- if .Get "prompt" }} data-prompt="{{ .Get "prompt" }}"{{ end }} + {{- if .Get "output" }} data-output="{{ .Get "output" }}"{{ end }} + ><code {{ if .Get "lang" }}class="language-{{ .Get "lang" }}"{{ end }} + >{{ $inner }}</code></pre> + {{ else }} + <pre class="language-{{ .Get 0 }}"> + <code class="language-{{ .Get 0 }}">{{ $inner }}</code></pre> + {{ end }} +{{ end }} |