mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +00:00
shortcodes: don't break build and render for invalid parameters #480
This commit is contained in:
parent
472176a88c
commit
0e0b3bb2fb
5 changed files with 66 additions and 3 deletions
43
exampleSite/content/tests/frontmatter.en.md
Normal file
43
exampleSite/content/tests/frontmatter.en.md
Normal file
|
@ -0,0 +1,43 @@
|
|||
+++
|
||||
description = "Test default settings for snippets of the VSCode Front Matter extension"
|
||||
title = "VSCode Front Matter"
|
||||
+++
|
||||
|
||||
## Empty Properties
|
||||
|
||||
{{< attachments title="" pattern="" sort="" style="" color="" icon="" />}}
|
||||
|
||||
{{< badge title="" style="" color="" icon="" >}}{{< /badge >}}
|
||||
|
||||
{{< button href="" target="" type="" style="" color="" icon="" iconposition="" >}}{{< /button >}}
|
||||
|
||||
{{< children description="" depth="" sort="" showhidden="" containerstyle="" style="" >}}
|
||||
|
||||
{{% expand title="" open="" %}}{{% /expand %}}
|
||||
|
||||
a{{< icon >}}a
|
||||
|
||||
{{< include file="" hidefirstheading="" >}}
|
||||
|
||||
````math align=""
|
||||
|
||||
````
|
||||
|
||||
````mermaid align="" zoom=""
|
||||
|
||||
````
|
||||
|
||||
{{% notice title="" style="" color="" icon="" %}}{{% /notice %}}
|
||||
|
||||
{{< siteparam >}}
|
||||
|
||||
{{< swagger src="" >}}
|
||||
|
||||
{{< tabs groupid="" >}}
|
||||
{{% tab name="" %}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{% tab name="" %}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tabs >}}
|
5
exampleSite/content/tests/frontmatter.pir.md
Normal file
5
exampleSite/content/tests/frontmatter.pir.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
+++
|
||||
description = "Test default settings for snippets of the VSCode Front Matter extension"
|
||||
title = "VSCode Front Matter"
|
||||
+++
|
||||
{{< piratify >}}
|
|
@ -4,10 +4,12 @@
|
|||
{{- if eq (printf "%T" $hideFirstHeading) "string" }}
|
||||
{{- $hideFirstHeading = (eq $hideFirstHeading "true") }}
|
||||
{{- end }}
|
||||
{{- if $hideFirstHeading }}<div class="include hide-first-heading">{{ end }}
|
||||
{{- with $context }}
|
||||
{{- if and (gt (len (trim $file " ")) 0) (fileExists $file) }}
|
||||
{{- if $hideFirstHeading }}<div class="include hide-first-heading">{{ end }}
|
||||
{{- with $context }}
|
||||
|
||||
{{ $file | readFile | safeHTML }}
|
||||
|
||||
{{- if $hideFirstHeading }}</div>{{ end }}
|
||||
{{- end }}
|
||||
{{- if $hideFirstHeading }}</div>{{ end }}
|
||||
{{- end }}
|
|
@ -24,6 +24,10 @@ html[dir="rtl"] #body .tab-nav-button{
|
|||
float: right;
|
||||
}
|
||||
|
||||
#body .tab-nav-button:after {
|
||||
content: "\200b"
|
||||
}
|
||||
|
||||
#body .tab-nav-button:first-child{
|
||||
margin-inline-start: 9px;
|
||||
}
|
||||
|
|
|
@ -1318,6 +1318,11 @@ html[dir="rtl"] .expand > .expand-label > i.fa-chevron-right {
|
|||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.btn > *:after {
|
||||
/* avoid breakage if no content is given */
|
||||
content: "\200b"
|
||||
}
|
||||
|
||||
#body #body-inner .btn > *.highlight:after {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
@ -1700,6 +1705,10 @@ html[dir] #sidebar .collapsible-menu input.toggle:checked:before {
|
|||
border-end-start-radius: 0;
|
||||
}
|
||||
|
||||
.badge-content:after {
|
||||
/* avoid breakage if no content is given */
|
||||
content: "\200b";
|
||||
}
|
||||
/* task list and its checkboxes */
|
||||
article ul li:has(input[type="checkbox"]) {
|
||||
list-style: none;
|
||||
|
|
Loading…
Reference in a new issue