0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Fixed <GhEmailPreviewLink> default text and whitespace

refs 21f2a58a8a

- passed in arg is `@data` not `@email` because it can be an email or post object
- added `~` handlebars syntax to collapse white-space so links can be surrounded by other chars without spaces being visible, eg `"<GhEmailPreviewLink />"`
This commit is contained in:
Kevin Ansfield 2022-01-25 13:27:58 +00:00
parent 21f2a58a8a
commit 6dc733ae3a

View file

@ -1,7 +1,7 @@
<a href="" role="button" {{on "click" this.openPreview}} ...attributes>
{{#if (has-block)}}
{{yield}}
{{~#if (has-block)~}}
{{~yield~}}
{{else}}
{{@email.subject}}
{{~or @data.subject @data.email.subject~}}
{{/if}}
</a>