fix template auto-formatting

This commit is contained in:
Robert Kaussow 2022-02-22 21:45:14 +01:00
parent f3e1ffdddc
commit a4d1f51b1b
No known key found for this signature in database
GPG key ID: 4E692A2EAECC03C0
3 changed files with 10 additions and 6 deletions

View file

@ -26,7 +26,7 @@ f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi
{{< /columns >}} {{< /columns >}}
KaTeX can also be used inline, for example {{< katex >}}\pi(x){{< /katex >}} or used with a `display` setting. for example `display: block`: KaTeX can also be used inline, for example {{< katex >}}\pi(x){{< /katex >}} or used with the `display` parameter (e.g. `display: block`):
<!-- spellchecker-disable --> <!-- spellchecker-disable -->
<!-- prettier-ignore --> <!-- prettier-ignore -->

View file

@ -1,12 +1,14 @@
<!-- prettier-ignore-start -->
{{ if not (.Page.Scratch.Get "katex") }} {{ if not (.Page.Scratch.Get "katex") }}
<!-- Include katext only first time --> <!-- Include katex only first time -->
<link <link
rel="stylesheet" rel="stylesheet"
href="{{ index (index .Site.Data.assets "katex.css") "src" | relURL }}" href="{{ index (index .Site.Data.assets "katex.css") "src" | relURL }}"
/><script defer src="{{ index (index .Site.Data.assets "katex.js") "src" | relURL }}"></script> />
<script defer src="{{ index (index .Site.Data.assets "katex.js") "src" | relURL }}"></script>
{{ .Page.Scratch.Set "katex" true }} {{ .Page.Scratch.Set "katex" true }}
{{ end }} {{ end }}
<!-- prettier-ignore-end -->
<span class="gdoc-katex katex{{ with .Get "class" }}{{ . }}{{ end }}"> <span class="gdoc-katex katex{{ with .Get "class" }}{{ . }}{{ end }}">
{{ cond (in .Params "display") "\\[" "\\(" -}} {{ cond (in .Params "display") "\\[" "\\(" -}}

View file

@ -1,8 +1,10 @@
<!-- prettier-ignore-start -->
{{ if not (.Page.Scratch.Get "mermaid") }} {{ if not (.Page.Scratch.Get "mermaid") }}
<!-- Include mermaid only first time --><script defer src="{{ index (index .Site.Data.assets "mermaid.js") "src" | relURL }}"></script> <!-- Include mermaid only first time -->
<script defer src="{{ index (index .Site.Data.assets "mermaid.js") "src" | relURL }}"></script>
{{ .Page.Scratch.Set "mermaid" true }} {{ .Page.Scratch.Set "mermaid" true }}
{{ end }} {{ end }}
<!-- prettier-ignore-end -->
<pre class="gdoc-mermaid mermaid{{ with .Get "class" }}{{ printf " %s" . }}{{ end }}"> <pre class="gdoc-mermaid mermaid{{ with .Get "class" }}{{ printf " %s" . }}{{ end }}">
{{- .Inner -}} {{- .Inner -}}