Browse Source

fix(snippets): reverse logic for external link styling

Josh Habdas 1 year ago
parent
commit
0fcf238e19
Signed by: Josh Habdas <jhabdas@protonmail.com> GPG Key ID: B148B31154C75A74
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      layouts/partials/components/external.html

+ 1
- 1
layouts/partials/components/external.html View File

@@ -1 +1 @@
1
-<a {{ with .itemtype }} itemprop itemtype="http://schema.org/{{ . }}"{{ end }} target="{{ .target | default "_blank" }}"{{ with .rel }} rel="{{ . }}"{{ else }} rel="{{ if eq .supress_external true }}external{{ end }} noopener"{{ end }} href="{{ .href }}"{{ with .referrerpolicy }} referrerpolicy="{{ . }}"{{ end }}{{ with .class }} class="{{ . }}"{{ end }}>{{ .body | default (replaceRE "^https?://(.*)" "$1" .href) }}</a>
1
+<a {{ with .itemtype }} itemprop itemtype="http://schema.org/{{ . }}"{{ end }} target="{{ .target | default "_blank" }}"{{ with .rel }} rel="{{ . }}"{{ else }} rel="{{ if ne .supress_external true }}external{{ end }} noopener"{{ end }} href="{{ .href }}"{{ with .referrerpolicy }} referrerpolicy="{{ . }}"{{ end }}{{ with .class }} class="{{ . }}"{{ end }}>{{ .body | default (replaceRE "^https?://(.*)" "$1" .href) }}</a>

Loading…
Cancel
Save