Skip to content

Commit

Permalink
Dedent markup in icon shortcode
Browse files Browse the repository at this point in the history
  • Loading branch information
willfaught committed Jun 7, 2024
1 parent 1c4dfd5 commit 72ca13c
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions layouts/shortcodes/paige/icon.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@
{{ errorf "layouts/shortcodes/paige/icon.html: no class" }}
{{ end }}

{{/* The markup below cannot be indented due to nested shortcodes within Markdown. */}}

<span class="paige-icon">
{{ with $url }}
<a href="{{ . }}" {{ with $target }} target="{{ . }}" {{ end }} {{ with $title }} title="{{ . }}" {{ end }}>
{{ end }}
{{ with $url }}
<a href="{{ . }}" {{ with $target }} target="{{ . }}" {{ end }} {{ with $title }} title="{{ . }}" {{ end }}>
{{ end }}

<i class="{{ $class }}">{{ with $title }}<span class="visually-hidden">{{ . }}</span>{{ end }}</i>
<i class="{{ $class }}">{{ with $title }}<span class="visually-hidden">{{ . }}</span>{{ end }}</i>

{{ if $url }}
</a>
{{ end }}
{{ if $url }}
</a>
{{ end }}
</span>

0 comments on commit 72ca13c

Please sign in to comment.